Commit 88a930d
refactor(FR-3877): read myUserV2 at login through Relay so the response type is generated
The login read was a raw `client.query` string with a hand-written response
type. `RelayEnvironment`'s fetch function resolves `globalThis.backendaiclient`
at request time — the same signed `/admin/gql` request `client.query` makes —
and `connectViaGQL` installs the client before its first read, so the query
can be a `graphql` tag inside the function: Relay compiles it and generates
`loginSessionAuthMyUserQuery`, and the hand-written type goes away.
The test mocks the `RelayEnvironment` module with `createMockEnvironment()`
and queues one payload per page.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BX2RuEAvsXWdxgi2MdaMsz1 parent b6e6e88 commit 88a930d
3 files changed
Lines changed: 424 additions & 72 deletions
File tree
- react/src
- __generated__
- helper
Lines changed: 331 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments