You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make strawberry.Info the canonical and ergonomic Info type across Strawberry's user-facing resolution APIs before V1.
Scope
Internal graphql-core adapters necessarily receive GraphQLResolveInfo. The goal should be consistency for callbacks and hooks implemented by users, rather than mechanically replacing every internal use. Any user-facing callback that intentionally keeps GraphQLResolveInfo should be an explicit, documented V1 decision.
Current audit
Already using Strawberry Info
Export Info as strawberry.Info
Field, mutation, and subscription resolvers receive strawberry.Info (or the configured info_class)
Permissions and field extensions receive Strawberry Info
Exception handlers, Federation resolve_reference, and Strawberry Relay resolver hooks receive Strawberry Info
Operation-directive resolvers receive Strawberry Info, including custom info_class subclasses
The raw GraphQLResolveInfo annotation in strawberry/extensions/directives.py is on the internal SchemaExtension middleware boundary. process_directive wraps it with schema.config.info_class before invoking the user-authored directive resolver, so directive resolvers themselves are not currently a gap.
User-facing APIs still receiving GraphQLResolveInfo
SchemaExtension.resolve receives GraphQLResolveInfo; the custom-extensions guide also documents this raw type
OpenTelemetryExtension's public arg_filter callback receives GraphQLResolveInfo
Audit other public callbacks exposed by schema/built-in extensions and either migrate them or document why they intentionally remain graphql-core APIs
Raw info used only inside the schema converter, union resolution, tracing implementations, selection conversion, and other graphql-core adapters should remain an implementation detail unless it is passed through a public callback.
Directive-specific gap
There are two distinct directive concerns:
The info argument passed to an operation-directive resolver is already Strawberry Info.
Directive arguments exposed through info.selected_fields[*].directives are converted by strawberry/types/nodes.py into plain Python values. Nested Strawberry input objects therefore remain dictionaries instead of their declared Strawberry input type. This is tracked by Conversion into strawberry type on directives in the info object聽#3155 and is still reproducible.
Remaining decisions and work
Decide whether all user-authored resolution callbacks above should receive the configured info_class, including custom subclasses
Define how SchemaExtension.resolve and its _next chain expose Strawberry Info while preserving the graphql-core middleware boundary
Preserve access to the underlying object through Info._raw_info for users that need graphql-core details
Add runtime tests for each migrated callback, including custom info_class coverage and sync/async paths where applicable
Update the custom-extension and type-resolution documentation
Add migration documentation/release notes for callbacks changing from GraphQLResolveInfo, since these are runtime breaking changes
Make
strawberry.Infothe canonical and ergonomic Info type across Strawberry's user-facing resolution APIs before V1.Scope
Internal graphql-core adapters necessarily receive
GraphQLResolveInfo. The goal should be consistency for callbacks and hooks implemented by users, rather than mechanically replacing every internal use. Any user-facing callback that intentionally keepsGraphQLResolveInfoshould be an explicit, documented V1 decision.Current audit
Already using Strawberry Info
Infoasstrawberry.Infostrawberry.Info(or the configuredinfo_class)resolve_reference, and Strawberry Relay resolver hooks receive Strawberry Infoinfo_classsubclassesThe raw
GraphQLResolveInfoannotation instrawberry/extensions/directives.pyis on the internalSchemaExtensionmiddleware boundary.process_directivewraps it withschema.config.info_classbefore invoking the user-authored directive resolver, so directive resolvers themselves are not currently a gap.User-facing APIs still receiving GraphQLResolveInfo
SchemaExtension.resolvereceivesGraphQLResolveInfo; the custom-extensions guide also documents this raw typeis_type_ofhooks receiveGraphQLResolveInforesolve_typehooks receiveGraphQLResolveInfoOpenTelemetryExtension's publicarg_filtercallback receivesGraphQLResolveInfoRaw info used only inside the schema converter, union resolution, tracing implementations, selection conversion, and other graphql-core adapters should remain an implementation detail unless it is passed through a public callback.
Directive-specific gap
There are two distinct directive concerns:
infoargument passed to an operation-directive resolver is already Strawberry Info.info.selected_fields[*].directivesare converted bystrawberry/types/nodes.pyinto plain Python values. Nested Strawberry input objects therefore remain dictionaries instead of their declared Strawberry input type. This is tracked by Conversion into strawberry type on directives in the info object聽#3155 and is still reproducible.Remaining decisions and work
info_class, including custom subclassesSchemaExtension.resolveand its_nextchain expose Strawberry Info while preserving the graphql-core middleware boundaryInfo._raw_infofor users that need graphql-core detailsinfo_classcoverage and sync/async paths where applicableGraphQLResolveInfo, since these are runtime breaking changesInfo | Noneannotation ergonomics in Support Union[strawberry.Info, None] annotation for Info.聽#4389Related
Infotype is annoying to access聽#2768Infoand similar when used withTYPE_CHECKINGblocks聽#2889