NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1727 most downloaded on PyPI
A library for creating GraphQL APIs
Last release 10 days ago
07 Sep 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
1114 releases · first in 2019
This release adds a new (preferable) way to handle optional updates. Up until now when you wanted to inffer if an input value was null or absent you'd
This release adds a new (preferable) way to handle optional updates. Up until
now when you wanted to inffer if an input value was null or absent you'd use
strawberry.UNSET which is a bit cumbersome and error prone.
Now you can use strawberry.Maybe to identify if a
value was provided or not.
e.g.
import strawberry
@strawberry.type
class User:
name: str
phone: str | None
@strawberry.input
class UpdateUserInput:
name: str
phone: strawberry.Maybe[str]
@strawberry.type
class Mutation:
def update_user(self, input: UpdateUserInput) -> None:
reveal_type(input.phone) # strawberry.Some[str | None] | None
if input.phone:
reveal_type(input.phone.value) # str | None
update_user_phone(input.phone.value)
Or, if you can use pattern matching:
@strawberry.type
class Mutation:
def update_user(self, input: UpdateUserInput) -> None:
match input.phone:
case strawberry.Some(value=value):
update_user_phone(input.phone.value)
You can also use strawberry.Maybe as a field argument like so
import strawberry
@strawberry.field
def filter_users(self, phone: strawberry.Maybe[str] = None) -> list[User]:
if phone:
return filter_users_by_phone(phone.value)
return get_all_users()
Releases contributed by @nrbnlulu via #3791
One column per quarter.
This release adds support for custom names in enum values using the name parameter in strawberry.enum_value.
This release adds support for custom names in enum values using the name parameter in strawberry.enum_value.
This allows you to specify a different name for an enum value in the GraphQL schema while keeping the original Python enum member name. For example:
@strawberry.enum
class IceCreamFlavour(Enum):
VANILLA = "vanilla"
CHOCOLATE_COOKIE = strawberry.enum_value("chocolate", name="chocolateCookie")
This will produce a GraphQL schema with the custom name:
enum IceCreamFlavour {
VANILLA
chocolateCookie
}
Releases contributed by @patrick91 via #3841
Nothing published for this version
Fix bug where files would be converted into io.BytesIO when using the sanic GraphQLView instead of using the sanic File type
Fix bug where files would be converted into io.BytesIO when using the sanic GraphQLView instead of using the sanic File type
Releases contributed by @Maypher via #3751
Fix bug where files would be converted into io.BytesIO when using the sanic GraphQLView instead of using the sanic File type
This release adds support for using strawberry.union with generics, like in this example:
This release adds support for using strawberry.union with generics, like in this example:
@strawberry.type
class ObjectQueries[T]:
@strawberry.field
def by_id(
self, id: strawberry.ID
) -> Union[T, Annotated[NotFoundError, strawberry.union("ByIdResult")]]: ...
@strawberry.type
class Query:
@strawberry.field
def some_type_queries(self, id: strawberry.ID) -> ObjectQueries[SomeType]: ...
which, now, creates a correct union type named SomeTypeByIdResult
Releases contributed by @enoua5 via #3515
This release adds support for using strawberry.union with generics, like in this example:
@strawberry.type
class ObjectQueries[T]:
@strawberry.field
def by_id(
self, id: strawberry.ID
) -> Union[T, Annotated[NotFoundError, strawberry.union("ByIdResult")]]: ...
@strawberry.type
class Query:
@strawberry.field
def some_type_queries(self, id: strawberry.ID) -> ObjectQueries[SomeType]: ...
which, now, creates a correct union type named SomeTypeByIdResult
Contributed by Jacob Allen via PR #3515
Change pydantic conversion to not load field data unless requested
Change pydantic conversion to not load field data unless requested
Releases contributed by @Mark90 via #3812
Change pydantic conversion to not load field data unless requested
This releases improves support for relay.Edge subclasses.
This releases improves support for relay.Edge subclasses.
resolve_edge now accepts **kwargs, so custom fields can be added to your edge classes without wholly
replacing resolve_edge:
@strawberry.type(name="Edge", description="An edge in a connection.")
class CustomEdge(relay.Edge[NodeType]):
index: int
@classmethod
def resolve_edge(cls, node: NodeType, *, cursor: Any = None, **kwargs: Any) -> Self:
assert isinstance(cursor, int)
return super().resolve_edge(node, cursor=cursor, index=cursor, **kwargs)
You can also specify a custom cursor prefix, in case you want to implement a different
kind of cursor than a plain ListConnection:
@strawberry.type(name="Edge", description="An edge in a connection.")
class CustomEdge(relay.Edge[NodeType]):
CURSOR_PREFIX: ClassVar[str] = "mycursor"
Releases contributed by @diesieben07 via #3836
This release contains a few improvements to how AsyncGenerators are handled by strawberry codebase, ensuring they get properly closed in case of unexp
This release contains a few improvements to how AsyncGenerators are handled by
strawberry codebase, ensuring they get properly closed in case of unexpected
errors.
Releases contributed by @bellini666 via #3834
This release contains a few improvements to how AsyncGenerators are handled by
strawberry codebase, ensuring they get properly closed in case of unexpected
errors.
Contributed by Thiago Bellini Ribeiro via PR #3834
This releases add support for passing in a custom TracerProvider to the OpenTelemetryExtension.
This releases add support for passing in a custom TracerProvider to the OpenTelemetryExtension.
Releases contributed by @cdorsey via #3830
This releases add support for passing in a custom TracerProvider to the OpenTelemetryExtension.
Contributed by Chase Dorsey via PR #3830
Adds the ability to include pydantic computed fields when using pydantic.type decorator.
Adds the ability to include pydantic computed fields when using pydantic.type decorator.
Example:
class UserModel(pydantic.BaseModel):
age: int
@computed_field
@property
def next_age(self) -> int:
return self.age + 1
@strawberry.experimental.pydantic.type(
UserModel, all_fields=True, include_computed=True
)
class User:
pass
Will allow nextAge to be requested from a user entity.
Releases contributed by @tylernisonoff via #3798
Adds the ability to include pydantic computed fields when using pydantic.type decorator.
Example:
class UserModel(pydantic.BaseModel):
age: int
@computed_field
@property
def next_age(self) -> int:
return self.age + 1
@strawberry.experimental.pydantic.type(
UserModel, all_fields=True, include_computed=True
)
class User:
pass
Will allow nextAge to be requested from a user entity.
Contributed by Tyler Nisonoff via PR #3798
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
This release updates the Content-Type header from "text/html" to "text/html; charset=utf-8" to prevent the GraphQL IDE from displaying unusual or in
This release updates the Content-Type header from "text/html" to "text/html; charset=utf-8" to prevent the GraphQL IDE from displaying unusual or incorrect characters.
Releases contributed by @moritz89 via #3824
This release updates the Content-Type header from "text/html" to "text/html; charset=utf-8" to prevent the GraphQL IDE from displaying unusual or incorrect characters.
Contributed by Moritz Ulmer via PR #3824
This release updates the internals of our subscription implementation, to make the code easier to maintain for future changes.
This release updates the internals of our subscription implementation, to make the code easier to maintain for future changes.
Releases contributed by @patrick91 via #3787
This release updates the internals of our subscription implementation, to make the code easier to maintain for future changes.
Contributed by Patrick Arminio via PR #3787
This release adds support for the upcoming version of Pydantic (2.11)
This release adds support for the upcoming version of Pydantic (2.11)
Releases contributed by @patrick91 via #3808
This release adds support for the upcoming version of Pydantic (2.11)
Contributed by Patrick Arminio via PR #3808
This release changes the required version of packaging from >=24 to >=23, in order to allow using Strawberry on https://play.strawberry.rocks
This release changes the required version of packaging from >=24 to >=23, in order to allow using Strawberry on https://play.strawberry.rocks
Releases contributed by @patrick91 via #3806
This release changes the required version of packaging from >=24 to >=23, in order to allow using Strawberry on https://play.strawberry.rocks
Contributed by Patrick Arminio via PR #3806
This release adds missing packaging dependency required by DatadogTracingExtension
This release adds missing packaging dependency required by DatadogTracingExtension
Releases contributed by @jakub-bacic via #3803
This release adds missing packaging dependency required by DatadogTracingExtension
Contributed by Jakub Bacic via PR #3803
This release updates the handling of the Django graphql/graphiql.html template, if provided; it will now receive the current request as context.
This release updates the handling of the Django graphql/graphiql.html template, if provided; it will now receive the current request as context.
Releases contributed by @sersorrel via #3800
This release updates the handling of the Django graphql/graphiql.html template, if provided; it will now receive the current request as context.
This release adds support for exporting schema created by a callable:
This release adds support for exporting schema created by a callable:
strawberry export-schema package.module:create_schema
when
def create_schema():
return strawberry.Schema(query=Query)
Releases contributed by @alexey-pelykh via #3797
This release adds support for exporting schema created by a callable:
strawberry export-schema package.module:create_schema
when
def create_schema():
return strawberry.Schema(query=Query)
Contributed by Alexey Pelykh via PR #3797
This release adds support for exporting schema created by a callable:
Terminal window
strawberry export-schema package.module:create_schema
when
def create_schema ():
return strawberry.Schema( query =Query)
Contributed by Alexey Pelykh via PR #3797
This release updates the Python version requirement to use python >= 3.9 instead of ^3.9 to avoid conflicts with other projects that use >= 3.x
This release updates the Python version requirement to use python >= 3.9 instead of ^3.9 to avoid conflicts with other projects that use >= 3.x
Releases contributed by @PaleNeutron via #3789
This release updates the Python version requirement to use python >= 3.9 instead of ^3.9 to avoid conflicts with other projects that use >= 3.x
This release adds support for type[strawberry.UNSET] in addition to strawberry.types.unset.UnsetType for annotations.
This release adds support for type[strawberry.UNSET] in addition to strawberry.types.unset.UnsetType for annotations.
@strawberry.type
class User:
name: str | None = UNSET
age: int | None | type[strawberry.UNSET] = UNSET
Releases contributed by @alexey-pelykh via #3765
This release adds support for type[strawberry.UNSET] in addition to strawberry.types.unset.UnsetType for annotations.
@strawberry.type
class User:
name: str | None = UNSET
age: int | None | type[strawberry.UNSET] = UNSET
Contributed by Alexey Pelykh via PR #3765
This release adds support for Datadog ddtrace v3.0.0 in the DatadogTracingExtension
This release adds support for Datadog ddtrace v3.0.0 in the DatadogTracingExtension
Releases contributed by @jonfinerty via #3794
This release adds support for Datadog ddtrace v3.0.0 in the DatadogTracingExtension
Contributed by Jon Finerty via PR #3794
This release fixes the issue that some subscription resolvers were not canceled if a client unexpectedly disconnected.
This release fixes the issue that some subscription resolvers were not canceled if a client unexpectedly disconnected.
Releases contributed by @jakub-bacic via #3778
This release fixes the issue that some subscription resolvers were not canceled if a client unexpectedly disconnected.
Contributed by Jakub Bacic via PR #3778
This release fixes an issue where directives with input types using snake_case would not be printed in the schema.
This release fixes an issue where directives with input types using snake_case would not be printed in the schema.
For example, the following:
@strawberry.input
class FooInput:
hello: str
hello_world: str
@strawberry.schema_directive(locations=[Location.FIELD_DEFINITION])
class FooDirective:
input: FooInput
@strawberry.type
class Query:
@strawberry.field(
directives=[
FooDirective(input=FooInput(hello="hello", hello_world="hello world")),
]
)
def foo(self, info) -> str: ...
Would previously print as:
directive @fooDirective(
input: FooInput!
optionalInput: FooInput
) on FIELD_DEFINITION
type Query {
foo: String! @fooDirective(input: { hello: "hello" })
}
input FooInput {
hello: String!
hello_world: String!
}
Now it will be correctly printed as:
directive @fooDirective(
input: FooInput!
optionalInput: FooInput
) on FIELD_DEFINITION
type Query {
foo: String!
@fooDirective(input: { hello: "hello", helloWorld: "hello world" })
}
input FooInput {
hello: String!
hello_world: String!
}
Releases contributed by @bellini666 via #3780
This release fixes an issue where extensions were being duplicated when custom directives were added to the schema. Previously, when user directives w
This release fixes an issue where extensions were being duplicated when custom directives were added to the schema. Previously, when user directives were present, extensions were being appended twice to the extension list, causing them to be executed multiple times during query processing.
The fix ensures that extensions are added only once and maintains their original order. Test cases have been added to validate this behavior and ensure extensions are executed exactly once.
Releases contributed by @doney-dkp via #3783
Support aliases (TypeVar passthrough) in get_specialized_type_var_map.
Support aliases (TypeVar passthrough) in get_specialized_type_var_map.
Releases contributed by @alexey-pelykh via #3766
Support aliases (TypeVar passthrough) in get_specialized_type_var_map.
Contributed by Alexey Pelykh via PR #3766
This release adjusts the context_getter attribute from the fastapi GraphQLRouter to accept an async callables.
This release adjusts the context_getter attribute from the fastapi GraphQLRouter
to accept an async callables.
Releases contributed by @alexey-pelykh via #3763
This release adjusts the context_getter attribute from the fastapi GraphQLRouter
to accept an async callables.
Contributed by Alexey Pelykh via PR #3763
This release refactors some of the internal execution logic by:
This release refactors some of the internal execution logic by:
This is an internal refactor that should not affect the public API or functionality. The changes make the codebase simpler and easier to maintain.
Releases contributed by @patrick91 via #3771
This release refactors some of the internal execution logic by:
Moving execution logic from separate files into schema.py for better organization
Using graphql-core’s parse and validate functions directly instead of wrapping them
Removing redundant execute.py and subscribe.py files
This is an internal refactor that should not affect the public API or functionality. The changes make the codebase simpler and easier to maintain.
Contributed by Patrick Arminio via PR #3771
This release adjusts the schema printer to avoid printing a schema directive value set to UNSET as "" (empty string).
This release adjusts the schema printer to avoid printing a schema directive
value set to UNSET as "" (empty string).
For example, the following:
@strawberry.input
class FooInput:
a: str | None = strawberry.UNSET
b: str | None = strawberry.UNSET
@strawberry.schema_directive(locations=[Location.FIELD_DEFINITION])
class FooDirective:
input: FooInput
@strawberry.type
class Query:
@strawberry.field(directives=[FooDirective(input=FooInput(a="aaa"))])
def foo(self, info) -> str: ...
Would previously print as:
directive @fooDirective(
input: FooInput!
optionalInput: FooInput
) on FIELD_DEFINITION
type Query {
foo: String! @fooDirective(input: { a: "aaa", b: "" })
}
input FooInput {
a: String
b: String
}
Now it will be correctly printed as:
directive @fooDirective(
input: FooInput!
optionalInput: FooInput
) on FIELD_DEFINITION
type Query {
foo: String! @fooDirective(input: { a: "aaa" })
}
input FooInput {
a: String
b: String
}
Releases contributed by @bellini666 via #3770
Add the ability to override the "max results" a relay's connection can return on a per-field basis.
Add the ability to override the "max results" a relay's connection can return on a per-field basis.
The default value for this is defined in the schema's config, and set to 100
unless modified by the user. Now, that per-field value will take precedence over
it.
For example:
@strawerry.type
class Query:
# This will still use the default value in the schema's config
fruits: ListConnection[Fruit] = relay.connection()
# This will reduce the maximum number of results to 10
limited_fruits: ListConnection[Fruit] = relay.connection(max_results=10)
# This will increase the maximum number of results to 10
higher_limited_fruits: ListConnection[Fruit] = relay.connection(max_results=10_000)
Note that this only affects ListConnection and subclasses. If you are
implementing your own connection resolver, there's an extra keyword named
max_results: int | None that will be passed to it.
Releases contributed by @bellini666 via #3746
The common node: Node used to resolve relay nodes means we will be relying on is_type_of to check if the returned object is in fact a subclass of the
The common node: Node used to resolve relay nodes means we will be relying on
is_type_of to check if the returned object is in fact a subclass of the Node
interface.
However, integrations such as Django, SQLAlchemy and Pydantic will not return the type itself, but instead an alike object that is later resolved to the expected type.
In case there are more than one possible type defined for that model that is
being returned, the first one that replies True to is_type_of check would be
used in the resolution, meaning that when asking for "PublicUser:123",
strawberry could end up returning "User:123", which can lead to security
issues (such as data leakage).
In here we are introducing a new strawberry.cast, which will be used to mark
an object with the already known type by us, and when asking for is_type_of that
mark will be used to check instead, ensuring we will return the correct type.
That cast is already in place for the relay node resolution and pydantic.
Releases contributed by @bellini666 via #3749
Nothing published for this version
Support for supplying keyword arguments to pathlib.PurePath is deprecated and scheduled for removal in Python 3.14
This release updates Strawberry internally to no longer pass keywords arguments
to pathlib.PurePath. Support for supplying keyword arguments to
pathlib.PurePath is deprecated and scheduled for removal in Python 3.14
Releases contributed by @DoctorJohn via #3738
This release updates Strawberry internally to no longer pass keywords arguments
to pathlib.PurePath. Support for supplying keyword arguments to
pathlib.PurePath is deprecated and scheduled for removal in Python 3.14
Contributed by Jonathan Ehwald via PR #3738
We strongly recommend upgrading to Python 3.9 or a newer version, as older versions are no longer maintained and may contain security vulnerabilities.
This release drops support for Python 3.8, which reached its end-of-life (EOL) in October 2024. The minimum supported Python version is now 3.9.
We strongly recommend upgrading to Python 3.9 or a newer version, as older versions are no longer maintained and may contain security vulnerabilities.
Releases contributed by @bellini666 via #3730
This release drops support for Python 3.8, which reached its end-of-life (EOL) in October 2024. The minimum supported Python version is now 3.9.
We strongly recommend upgrading to Python 3.9 or a newer version, as older versions are no longer maintained and may contain security vulnerabilities.
Contributed by Thiago Bellini Ribeiro via PR #3730
This release adds support for making Relay connection optional, this is useful when you want to add permission classes to the connection and not fail
This release adds support for making Relay connection optional, this is useful when you want to add permission classes to the connection and not fail the whole query if the user doesn't have permission to access the connection.
Example:
import strawberry
from strawberry import relay
from strawberry.permission import BasePermission
class IsAuthenticated(BasePermission):
message = "User is not authenticated"
# This method can also be async!
def has_permission(
self, source: typing.Any, info: strawberry.Info, **kwargs
) -> bool:
return False
@strawberry.type
class Fruit(relay.Node):
code: relay.NodeID[int]
name: str
weight: float
@classmethod
def resolve_nodes(
cls,
*,
info: strawberry.Info,
node_ids: Iterable[str],
):
return []
@strawberry.type
class Query:
node: relay.Node = relay.node()
@relay.connection(
relay.ListConnection[Fruit] | None, permission_classes=[IsAuthenticated()]
)
def fruits(self) -> Iterable[Fruit]:
# This can be a database query, a generator, an async generator, etc
return all_fruits.values()
Releases contributed by @patrick91 via #3707
This release updates the Context and RootValue vars to have a default value of None, this makes it easier to use the views without having to pass in a
This release updates the Context and RootValue vars to have
a default value of None, this makes it easier to use the views
without having to pass in a value for these vars.
Releases contributed by @patrick91 via #3732
This release updates the Context and RootValue vars to have
a default value of None, this makes it easier to use the views
without having to pass in a value for these vars.
Contributed by Patrick Arminio via PR #3732
This release adds a new on_ws_connect method to all HTTP view integrations. The method is called when a graphql-transport-ws or graphql-ws connection
This release adds a new on_ws_connect method to all HTTP view integrations.
The method is called when a graphql-transport-ws or graphql-ws connection is
established and can be used to customize the connection acknowledgment behavior.
This is particularly useful for authentication, authorization, and sending a custom acknowledgment payload to clients when a connection is accepted. For example:
class MyGraphQLView(GraphQLView):
async def on_ws_connect(self, context: Dict[str, object]):
connection_params = context["connection_params"]
if not isinstance(connection_params, dict):
# Reject without a custom graphql-ws error payload
raise ConnectionRejectionError()
if connection_params.get("password") != "secret:
# Reject with a custom graphql-ws error payload
raise ConnectionRejectionError({"reason": "Invalid password"})
if username := connection_params.get("username"):
# Accept with a custom acknowledgement payload
return {"message": f"Hello, {username}!"}
# Accept without a acknowledgement payload
return await super().on_ws_connect(context)
Take a look at our documentation to learn more.
Releases contributed by @DoctorJohn via #3720
Description: Fixed a bug in the OpenTelemetryExtension class where the _span_holder dictionary was incorrectly shared across all instances. This was c
Description: Fixed a bug in the OpenTelemetryExtension class where the _span_holder dictionary was incorrectly shared across all instances. This was caused by defining _span_holder as a class-level attribute with a mutable default value (dict()).
Releases contributed by @conglei via #3716
Description: Fixed a bug in the OpenTelemetryExtension class where the _span_holder dictionary was incorrectly shared across all instances. This was caused by defining _span_holder as a class-level attribute with a mutable default value (dict()).
In this release, the return types of the get_root_value and get_context methods were updated to be consistent across all view integrations. Before thi
In this release, the return types of the get_root_value and get_context
methods were updated to be consistent across all view integrations. Before this
release, the return types used by the ASGI and Django views were too generic.
Releases contributed by @DoctorJohn via #3712
In this release, the return types of the get_root_value and get_context
methods were updated to be consistent across all view integrations. Before this
release, the return types used by the ASGI and Django views were too generic.
Contributed by Jonathan Ehwald via PR #3712
The view classes of all integrations now have a decode_json method that allows you to customize the decoding of HTTP JSON requests.
The view classes of all integrations now have a decode_json method that allows
you to customize the decoding of HTTP JSON requests.
This is useful if you want to use a different JSON decoder, for example, to optimize performance.
Releases contributed by @DoctorJohn via #3709
The view classes of all integrations now have a decode_json method that allows
you to customize the decoding of HTTP JSON requests.
This is useful if you want to use a different JSON decoder, for example, to optimize performance.
Contributed by Jonathan Ehwald via PR #3709
Starting with this release, the same JSON encoder is used to encode HTTP responses and WebSocket messages.
Starting with this release, the same JSON encoder is used to encode HTTP responses and WebSocket messages.
This enables developers to override the encode_json method on their views to
customize the JSON encoder used by all web protocols.
Releases contributed by @DoctorJohn via #3708
Starting with this release, the same JSON encoder is used to encode HTTP responses and WebSocket messages.
This enables developers to override the encode_json method on their views to
customize the JSON encoder used by all web protocols.
Contributed by Jonathan Ehwald via PR #3708
This release refactors part of the legacy graphql-ws protocol implementation, making it easier to read, maintain, and extend.
This release refactors part of the legacy graphql-ws protocol implementation, making it easier to read, maintain, and extend.
Releases contributed by @DoctorJohn via #3704
This release refactors part of the legacy graphql-ws protocol implementation, making it easier to read, maintain, and extend.
Contributed by Jonathan Ehwald via PR #3704
In this release, we migrated the graphql-transport-ws types from data classes to typed dicts. Using typed dicts enabled us to precisely model null ver
In this release, we migrated the graphql-transport-ws types from data classes to typed dicts.
Using typed dicts enabled us to precisely model null versus undefined values, which are common in that protocol.
As a result, we could remove custom conversion methods handling these cases and simplify the codebase.
Releases contributed by @DoctorJohn via #3701
In this release, we migrated the graphql-transport-ws types from data classes to typed dicts.
Using typed dicts enabled us to precisely model null versus undefined values, which are common in that protocol.
As a result, we could remove custom conversion methods handling these cases and simplify the codebase.
Contributed by Jonathan Ehwald via PR #3701
After a year-long deprecation period, the SentryTracingExtension has been removed in favor of the official Sentry SDK integration.
After a year-long deprecation period, the SentryTracingExtension has been
removed in favor of the official Sentry SDK integration.
To migrate, remove the SentryTracingExtension from your Strawberry schema and
then follow the
official Sentry SDK integration guide.
Releases contributed by @DoctorJohn via #3672
After a year-long deprecation period, the SentryTracingExtension has been
removed in favor of the official Sentry SDK integration.
To migrate, remove the SentryTracingExtension from your Strawberry schema and
then follow the
official Sentry SDK integration guide.
Contributed by Jonathan Ehwald via PR #3672
This release fixes the following deprecation warning:
This release fixes the following deprecation warning:
Failing to pass a value to the 'type_params' parameter of 'typing._eval_type' is deprecated,
as it leads to incorrect behaviour when calling typing._eval_type on a stringified annotation
that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
This was only trigger in Python 3.13 and above.
Releases contributed by @patrick91 via #3692
In this release, all types of the legacy graphql-ws protocol were refactored. The types are now much stricter and precisely model the difference betwe
In this release, all types of the legacy graphql-ws protocol were refactored. The types are now much stricter and precisely model the difference between null and undefined fields. As a result, our protocol implementation and related tests are now more robust and easier to maintain.
Releases contributed by @DoctorJohn via #3689
In this release, all types of the legacy graphql-ws protocol were refactored. The types are now much stricter and precisely model the difference between null and undefined fields. As a result, our protocol implementation and related tests are now more robust and easier to maintain.
Contributed by Jonathan Ehwald via PR #3689
This release fixes the issue that some coroutines in the WebSocket protocol handlers were never awaited if clients disconnected shortly after starting
This release fixes the issue that some coroutines in the WebSocket protocol handlers were never awaited if clients disconnected shortly after starting an operation.
Releases contributed by @DoctorJohn via #3687
This release fixes the issue that some coroutines in the WebSocket protocol handlers were never awaited if clients disconnected shortly after starting an operation.
Contributed by Jonathan Ehwald via PR #3687
Starting with this release, both websocket-based protocols will handle unexpected socket disconnections more gracefully.
Starting with this release, both websocket-based protocols will handle unexpected socket disconnections more gracefully.
Releases contributed by @DoctorJohn via #3685
Starting with this release, both websocket-based protocols will handle unexpected socket disconnections more gracefully.
Contributed by Jonathan Ehwald via PR #3685
This release fixes a regression in the legacy GraphQL over WebSocket protocol. Legacy protocol implementations should ignore client message parsing er
This release fixes a regression in the legacy GraphQL over WebSocket protocol. Legacy protocol implementations should ignore client message parsing errors. During a recent refactor, Strawberry changed this behavior to match the new protocol, where parsing errors must close the WebSocket connection. The expected behavior is restored and adequately tested in this release.
Releases contributed by @DoctorJohn via #3670
This release fixes a regression in the legacy GraphQL over WebSocket protocol. Legacy protocol implementations should ignore client message parsing errors. During a recent refactor, Strawberry changed this behavior to match the new protocol, where parsing errors must close the WebSocket connection. The expected behavior is restored and adequately tested in this release.
Contributed by Jonathan Ehwald via PR #3670
This release addresses a bug where directives were being added multiple times when defined in an interface which multiple objects inherits from.
This release addresses a bug where directives were being added multiple times when defined in an interface which multiple objects inherits from.
The fix involves deduplicating directives when applying extensions/permissions to a field, ensuring that each directive is only added once.
Releases contributed by @Speedy1991 via #3674
This release addresses a bug where directives were being added multiple times when defined in an interface which multiple objects inherits from.
The fix involves deduplicating directives when applying extensions/permissions to a field, ensuring that each directive is only added once.
This release tweaks the Flask integration's render_graphql_ide method to be stricter typed internally, making type checkers ever so slightly happier.
This release tweaks the Flask integration's render_graphql_ide method to be stricter typed internally, making type checkers ever so slightly happier.
Releases contributed by @DoctorJohn via #3666
This release tweaks the Flask integration's render_graphql_ide method to be stricter typed internally, making type checkers ever so slightly happier.
Contributed by Jonathan Ehwald via PR #3666
This release adds support for using raw Python enum types in your schema (enums that are not decorated with @strawberry.enum)
This release adds support for using raw Python enum types in your schema
(enums that are not decorated with @strawberry.enum)
This is useful if you have enum types from other places in your code that you want to use in strawberry. i.e
# somewhere.py
from enum import Enum
class AnimalKind(Enum):
AXOLOTL, CAPYBARA = range(2)
# gql/animals
from somewhere import AnimalKind
@strawberry.type
class AnimalType:
kind: AnimalKind
Releases contributed by @nrbnlulu via #3639
This change is backwards-compatible, but the old option name will raise a deprecation warning.
The AIOHTTP, ASGI, and Django test clients' asserts_errors option has been renamed to assert_no_errors to better reflect its purpose.
This change is backwards-compatible, but the old option name will raise a deprecation warning.
Releases contributed by @DoctorJohn via #3661
The AIOHTTP, ASGI, and Django test clients' asserts_errors option has been renamed to assert_no_errors to better reflect its purpose.
This change is backwards-compatible, but the old option name will raise a deprecation warning.
Contributed by Jonathan Ehwald via PR #3661
This release removes the dated subscriptions_enabled setting from the Django and Channels integrations. Instead, WebSocket support is now enabled by d
This release removes the dated subscriptions_enabled setting from the Django and Channels integrations.
Instead, WebSocket support is now enabled by default in all GraphQL IDEs.
Releases contributed by @DoctorJohn via #3660
This release removes the dated subscriptions_enabled setting from the Django and Channels integrations.
Instead, WebSocket support is now enabled by default in all GraphQL IDEs.
Contributed by Jonathan Ehwald via PR #3660
Fixes an issue where the codegen tool would crash when working with a nullable list of types.
Fixes an issue where the codegen tool would crash when working with a nullable list of types.
Releases contributed by @enoua5 via #3653
Fixes an issue where the codegen tool would crash when working with a nullable list of types.
Contributed by Jacob Allen via PR #3653
Starting with this release, WebSocket logic now lives in the base class shared between all HTTP integrations. This makes the behaviour of WebSockets m
Starting with this release, WebSocket logic now lives in the base class shared between all HTTP integrations. This makes the behaviour of WebSockets much more consistent between integrations and easier to maintain.
Releases contributed by @DoctorJohn via #3638
Starting with this release, WebSocket logic now lives in the base class shared between all HTTP integrations. This makes the behaviour of WebSockets much more consistent between integrations and easier to maintain.
Contributed by Jonathan Ehwald via PR #3638
This releases adds support for Pydantic 2.9.0's Mypy plugin
This releases adds support for Pydantic 2.9.0's Mypy plugin
Releases contributed by @chrisemke via #3632
Your coding agent can read these notes before it upgrades. Set up the MCP server →