NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1573 most downloaded on PyPI
A library for creating GraphQL APIs
Last release today
04 Oct 2026
Ships fairly regularly
a new release about every 3 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
1125 releases · first in 2019
This release updates the mypy plugin and the typing for Pyright to treat all strawberry fields as keyword-only arguments. This reflects a previous cha
This release updates the mypy plugin and the typing for Pyright to treat all strawberry fields as keyword-only arguments. This reflects a previous change to the Strawberry API.
Contributed by Paulo Costa via PR #2191
Bug fix: Do not force kw-only=False in fields specified with strawberry.field()
Bug fix: Do not force kw-only=False in fields specified with strawberry.field()
Contributed by Paulo Costa via PR #2189
One column per quarter.
This release fixes a small issue that might happen when uploading files and not passing the operations object.
This release fixes a small issue that might happen when uploading files and not passing the operations object.
Contributed by Patrick Arminio via PR #2192
Nothing published for this version
DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.
Fix warnings during unit tests for Sanic’s upload.
Otherwise running unit tests results in a bunch of warning like this:
DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.
Contributed by Paulo Costa via PR #2178
Nothing published for this version
This release improves the dataloader class with new features:
This release improves the dataloader class with new features:
Explicitly cache invalidation, prevents old data from being fetched after a mutation
Importing data into the cache, prevents unnecessary load calls if the data has already been fetched by other means.
Contributed by Paulo Costa via PR #2149
This release adds improved support for Pyright and Pylance, VSCode default language server for Python.
This release adds improved support for Pyright and Pylance, VSCode default language server for Python.
Using strawberry.type , strawberry.field , strawberry.input and strawberry.enum will now be correctly recognized by Pyright and Pylance and won’t show errors.
Contributed by Patrick Arminio via PR #2172
Fix invalid deprecation warning issued on arguments annotated by a subclassed strawberry.types.Info .
Fix invalid deprecation warning issued on arguments annotated by a subclassed strawberry.types.Info .
Thanks to @ThirVondukr for the bug report!
Example:
class MyInfo ( Info ):
pass
@strawberry.type
class Query :
@strawberry.field
def is_tasty ( self , info : MyInfo) -> bool :
"""Subclassed info argument no longer raises deprecation warning."""
Contributed by San Kilkis via PR #2137
This release fixes the conversion of generic aliases when using pydantic.
This release fixes the conversion of generic aliases when using pydantic.
Contributed by Silas Sewell via PR #2152
Fix version parsing issue related to dev builds of Mypy in strawberry.ext.mypy_plugin
Fix version parsing issue related to dev builds of Mypy in strawberry.ext.mypy_plugin
Contributed by San Kilkis via PR #2157
Convert Tuple and Sequence types to GraphQL list types.
Convert Tuple and Sequence types to GraphQL list types.
Example:
from collections.abc import Sequence
from typing import Tuple
@strawberry.type
class User :
pets: Sequence[Pet]
favourite_ice_cream_flavours: Tuple[IceCreamFlavour]
Contributed by Jonathan Kim via PR #2164
This release adds strawberry.lazy which allows you to define the type of the field and its path. This is useful when you want to define a field with a
This release adds strawberry.lazy which allows you to define the type of the field and its path. This is useful when you want to define a field with a type that has a circular dependency.
For example, let’s say we have a User type that has a list of Post and a Post type that has a User :
posts.py
from typing import TYPE_CHECKING, Annotated
import strawberry
if TYPE_CHECKING:
from .users import User
@strawberry.type
class Post :
title: str
author: Annotated[ "User" , strawberry.lazy( ".users" )]
users.py
from typing import TYPE_CHECKING, Annotated, List
import strawberry
if TYPE_CHECKING:
from .posts import Post
@strawberry.type
class User :
name: str
posts: List[Annotated[ "Post" , strawberry.lazy( ".posts" )]]
Contributed by Patrick Arminio via PR #2158
Nothing published for this version
⚠️ This is a breaking change! Whenever instantiating a Strawberry type make sure that you only pass values are keyword arguments:
This release changes how dataclasses are created to make use of the new kw_only argument in Python 3.10 so that fields without a default value can now follow a field with a default value. This feature is also backported to all other supported Python versions.
More info: https://docs.python.org/3/library/dataclasses.html#dataclasses.dataclass
For example:
@strawberry.type
class MyType :
a: str = "Hi"
b: int
⚠️ This is a breaking change! Whenever instantiating a Strawberry type make sure that you only pass values are keyword arguments:
MyType( "foo" , 3 )
MyType( a = "foo" , b = 3 )
Contributed by Jonathan Kim via PR #1187
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
Nothing published for this version
Nothing published for this version
This release fixes a bug in the subscription clean up when subscribing using the graphql-transport-ws protocol, which could occasionally cause a ‘fina
This release fixes a bug in the subscription clean up when subscribing using the graphql-transport-ws protocol, which could occasionally cause a ‘finally’ statement within the task to not get run, leading to leaked resources.
Contributed by rjwills28 via PR #2141
This release fixes a couple of small styling issues with the GraphiQL explorer
This release fixes a couple of small styling issues with the GraphiQL explorer
Contributed by Patrick Arminio via PR #2143
Nothing published for this version
This release adds support for passing schema directives to Schema(..., types=[]) . This can be useful if using a built-inschema directive that’s not s
This release adds support for passing schema directives to Schema(..., types=[]) . This can be useful if using a built-inschema directive that’s not supported by a gateway.
For example the following:
import strawberry
from strawberry.scalars import JSON
from strawberry.schema_directive import Location
@strawberry.type
class Query :
example: JSON
@strawberry.schema_directive ( locations =[Location.SCALAR], name = "specifiedBy" )
class SpecifiedBy :
name: str
schema = strawberry.Schema( query =Query, types =[SpecifiedBy])
will print the following SDL:
directive @specifiedBy ( name : String !) on SCALAR
"""
The JSON scalar type represents JSON values as specified by ECMA-404.
"""
scalar JSON
@specifiedBy (
url : "https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf"
)
type Query {
example : JSON !
}
Contributed by Patrick Arminio via PR #2140
Nothing published for this version
This release fixes an issue with the updated GraphiQL interface.
This release fixes an issue with the updated GraphiQL interface.
Contributed by Doctor via PR #2138
This release updates the built-in GraphiQL version to version 2.0, which means you can now enjoy all the new features that come with the latest versio
This release updates the built-in GraphiQL version to version 2.0, which means you can now enjoy all the new features that come with the latest version!
Contributed by Matt Exact via PR #1889
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 restricts the backports.cached_property dependency to only be installed when Python < 3.8. Since version 3.8 cached_property is included
This release restricts the backports.cached_property dependency to only be installed when Python < 3.8. Since version 3.8 cached_property is included in the builtin functools . The code is updated to use the builtin version when Python >= 3.8.
Contributed by ljnsn via PR #2114
Keep extra discovered types sorted so that each schema printing is always the same.
Keep extra discovered types sorted so that each schema printing is always the same.
Contributed by Thiago Bellini Ribeiro via PR #2115
This release adds support for adding descriptions to enum values.
This release adds support for adding descriptions to enum values.
@strawberry.enum
class IceCreamFlavour ( Enum ):
VANILLA = strawberry.enum_value( "vanilla" )
STRAWBERRY = strawberry.enum_value(
"strawberry" ,
description = "Our favourite" ,
)
CHOCOLATE = "chocolate"
@strawberry.type
class Query :
favorite_ice_cream: IceCreamFlavour = IceCreamFlavour.STRAWBERRY
schema = strawberry.Schema( query =Query)
This produces the following schema
enum IceCreamFlavour {
VANILLA
"""Our favourite."""
STRAWBERRY
CHOCOLATE
}
type Query {
favoriteIceCream : IceCreamFlavour !
}
Contributed by Felipe Gonzalez via PR #2106
This release hides resolvable: True in @keys directives when using Apollo Federation 1, to preserve compatibility with older Gateways.
This release hides resolvable: True in @keys directives when using Apollo Federation 1, to preserve compatibility with older Gateways.
Contributed by Patrick Arminio via PR #2099
Nothing published for this version
This release adds an integration with Django Channels. The integration will allow you to use GraphQL subscriptions via Django Channels.
This release adds an integration with Django Channels. The integration will allow you to use GraphQL subscriptions via Django Channels.
Contributed by Dan Sloan via PR #1407
Nothing published for this version
This release adds full support for Apollo Federation 2.0. To opt-in you need to pass enable_federation_2=True to strawberry.federation.Schema , like i
This release adds full support for Apollo Federation 2.0. To opt-in you need to pass enable_federation_2=True to strawberry.federation.Schema , like in the following example:
@strawberry.federation.type ( keys =[ "id" ])
class User :
id : strawberry.ID
@strawberry.type
class Query :
user: User
schema = strawberry.federation.Schema( query =Query, enable_federation_2 = True )
This release also improves type checker support for the federation.
Contributed by Patrick Arminio via PR #2047
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
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
Nothing published for this version
Nothing published for this version
This release fixes a regression introduced in version 0.118.2 which was preventing using circular dependencies in Strawberry django and Strawberry dja
This release fixes a regression introduced in version 0.118.2 which was preventing using circular dependencies in Strawberry django and Strawberry django plus.
Contributed by Thiago Bellini Ribeiro via PR #2062
This release adds support for priting custom enums used only on schema directives, for example the following schema:
This release adds support for priting custom enums used only on schema directives, for example the following schema:
@strawberry.enum
class Reason ( str , Enum ):
EXAMPLE = "example"
@strawberry.schema_directive ( locations =[Location.FIELD_DEFINITION])
class Sensitive :
reason: Reason
@strawberry.type
class Query :
first_name: str = strawberry.field( directives =[Sensitive( reason =Reason.EXAMPLE)])
prints the following:
directive @sensitive ( reason : Reason !) on FIELD_DEFINITION
type Query {
firstName : String ! @sensitive ( reason : EXAMPLE )
}
enum Reason {
EXAMPLE
}
while previously it would omit the definition of the enum.
Contributed by Patrick Arminio via PR #2059
This release adds support for priting custom scalar used only on schema directives, for example the following schema:
This release adds support for priting custom scalar used only on schema directives, for example the following schema:
SensitiveConfiguration = strawberry.scalar( str , name = "SensitiveConfiguration" )
@strawberry.schema_directive ( locations =[Location.FIELD_DEFINITION])
class Sensitive :
config: SensitiveConfiguration
@strawberry.type
class Query :
first_name: str = strawberry.field( directives =[Sensitive( config = "Some config" )])
prints the following:
directive @sensitive ( config : SensitiveConfiguration !) on FIELD_DEFINITION
type Query {
firstName : String ! @sensitive ( config : "Some config" )
}
scalar SensitiveConfiguration
while previously it would omit the definition of the scalar.
Contributed by Patrick Arminio via PR #2058
This PR adds support for adding schema directives to the schema of your GraphQL API. For printing the following schema:
This PR adds support for adding schema directives to the schema of your GraphQL API. For printing the following schema:
@strawberry.schema_directive ( locations =[Location.SCHEMA])
class Tag :
name: str
@strawberry.type
class Query :
first_name: str = strawberry.field( directives =[Tag( name = "team-1" )])
schema = strawberry.Schema( query =Query, schema_directives =[Tag( name = "team-1" )])
will print the following:
directive @tag ( name : String !) on SCHEMA
schema @tag ( name : "team-1" ) {
query : Query
}
type Query {
firstName : String !
}
"""
Contributed by Patrick Arminio via PR #2054
This release fixes that the AIOHTTP integration ignored the operationName of query operations. This behaviour is a regression introduced in version 0.
This release fixes that the AIOHTTP integration ignored the operationName of query operations. This behaviour is a regression introduced in version 0.107.0.
Contributed by Jonathan Ehwald via PR #2055
This release adds support for printing default values for scalars like JSON.
This release adds support for printing default values for scalars like JSON.
For example the following:
import strawberry
from strawberry.scalars import JSON
@strawberry.input
class MyInput :
j: JSON = strawberry.field( default_factory = dict )
j2: JSON = strawberry.field( default_factory = lambda : { "hello" : "world" })
will print the following schema:
input MyInput {
j : JSON ! = {}
j2 : JSON ! = { hello : "world" }
}
Contributed by Patrick Arminio via PR #2048
Your coding agent can read these notes before it upgrades. Set up the MCP server →