lablup / lablup/backend.ai-webui
Replace login-check API call with initial GraphQL query to eliminate network waterfall on page load
- Dominant language
- TypeScript
- Stars
- 133
- Forks
- 81
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 344
Description
## Background
During WebUI page load, a dedicated `login-check` REST API call is made to validate the existing session before any other data fetching begins. This creates an unnecessary network request waterfall.
## Problem
The `login-check` call blocks subsequent data fetching. The page must wait for the login-check response before issuing GraphQL queries for the actual page data, adding latency to the initial load.
## Proposed Improvement
Replace the `login-check` call with a direct GraphQL query on page load. Since an invalid session will cause the GraphQL request to return a session-invalid error, session validity can be determined from the GraphQL response itself. This approach:
1. Eliminates the separate `login-check` network round-trip
1. Allows fetching richer, customizable data in the very first request
1. Still detects invalid sessions via GraphQL error responses
1. Removes the sequential waterfall (login-check → then GraphQL queries)
## Expected Outcome
- Faster initial page load by removing one network round-trip
- More flexible first-request payload (fetch exactly what the page needs)
- Session validity check happens implicitly via GraphQL error handling
Captured while working on branch: claude/upbeat-keller
JIRA Issue: FR-2367
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.