Skip to main content
Pass request-scoped state through the context argument to execute.
Type annotations are the primary injection signal. A parameter typed as a Context subclass receives the context object regardless of its name. Parameters named context or ctx are also treated as context for compatibility. Info exposes the schema, field name, parent type, path, variables, operation, root value, and typed context. Keep authentication principals, request identifiers, loaders, and service handles on a context object created per request. Avoid mutable process-global request state.