v0.328.0 requires graphql-core 3.3

Strawberry now requires graphql-core>=3.3.0,<3.4.0 . Support for graphql-core 3.2 and for the 3.3 pre-releases (3.3.0a* , 3.3.0b* and 3.3.0rc* ) has been removed.

Upgrading

Upgrade graphql-core together with Strawberry:

pip install --upgrade strawberry-graphql "graphql-core>=3.3.0"

Some packages still pin graphql-core<3.3 , most notably graphene and graphql-relay . If they’re installed in the same environment as Strawberry, your installer won’t be able to resolve the new requirement until they support graphql-core 3.3.

Behavior changes coming from graphql-core 3.3

graphql-core 3.3 changes some user-visible output, which Strawberry now always uses:

Custom execution context classes

graphql-core 3.3 replaces graphql.ExecutionContext with graphql.execution.Executor . If you pass a custom execution_context_class to your schema, subclass strawberry.schema.schema.StrawberryGraphQLCoreExecutionContext so that Strawberry features such as info.input_extensions and @defer /@stream keep working:

import strawberry
from strawberry.schema.schema import StrawberryGraphQLCoreExecutionContext
 
 
class MyExecutionContext(StrawberryGraphQLCoreExecutionContext): ...
 
 
schema = strawberry.Schema(query=Query, execution_context_class=MyExecutionContext)

Removed IS_GQL_32 and IS_GQL_33

The internal strawberry.utils.IS_GQL_32 and strawberry.utils.IS_GQL_33 constants have been removed, since only graphql-core 3.3 is supported.

Edit this page on GitHub