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):
- HTTP —
requestContextis present,connectionabsent. - WebSocket —
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.
services: IServiceRegistry
The live service registry (request-scoped over HTTP, plugin-level over WS).
optional
requestContext: IRequestContext
The HTTP request context. Absent over the WebSocket transport.
optional
user: IPrincipal
The authenticated principal, when the auth middleware published one.
optional
tenant: ITenant
The resolved tenant, when tenancy resolved one.
optional
connection: GraphqlConnectionInfo
The WebSocket connection info. Present only over the WS transport.