OptionalconnectionThe WebSocket connection info. Present only over the WS transport.
OptionalrequestThe HTTP request context. Absent over the WebSocket transport.
The live service registry (request-scoped over HTTP, plugin-level over WS).
OptionaltenantThe resolved tenant, when tenancy resolved one.
OptionaluserThe authenticated principal, when the auth middleware published one.
Default context shape that resolvers receive.
Typed against
@setu-ts/common(X6-4) so a resolver can reach the service registry and the auth/tenancy principals without hand-written casts.The per-transport shape is deliberate (X6-6):
requestContextis present,connectionabsent.connectionis present,requestContextabsent (notundefined): the runtime closes the upgrade request once the handshake response is returned, so a synthesized context would be dead by the time a resolver runs. The upgrade request's headers and query live onGraphqlConnectionInfo.headersand.query.