Skip to content

Releases: strawberry-graphql/strawberry

🍓 0.287.3

12 Dec 11:49

Choose a tag to compare

Fix compatibility with Python 3.14 when using the Pydantic integration with Pydantic V2.

Previously, importing strawberry.experimental.pydantic on Python 3.14 would trigger:

UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.

This is now fixed by avoiding pydantic.v1 imports on Python 3.14+.

Releases contributed by @patrick91 via #4072

🍓 0.287.2

03 Dec 23:24

Choose a tag to compare

Fixed a bug in the codegen where Relay Node's id field was incorrectly generated as _id in the output code.

The codegen now correctly respects the explicit graphql_name set via the @field(name="id") decorator, ensuring that the generated code uses id instead of the Python method name _id.

Releases contributed by @Ckk3 via #4053

🍓 0.287.1

03 Dec 17:07

Choose a tag to compare

Fix mypy plugin issues related to new version of mypy.
The TypeAlias class has one more required argument "module" in the mypy version >= 1.19.

Releases contributed by @Ansud via #4060

🍓 0.287.0

22 Nov 13:00

Choose a tag to compare

Change strawberry.http.base.BaseView.encode_json() type hint to str | bytes and adjust dependent code appropriately.

Releases contributed by @Brandieee via #4054

🍓 0.286.1

21 Nov 16:36

Choose a tag to compare

Set Content-Type to text/plain for exceptions so that these are displayed
correctly.

Releases contributed by @mgorven via #4037

🍓 0.286.0

18 Nov 18:05

Choose a tag to compare

This release changes _enum_definition to __strawberry_definition__, this is a follow up to previous
internal changes. If you were relying on _enum_definition you should update your code to use __strawberry_definition__.

We also expose has_enum_definition to check if a type is a strawberry enum definition.

from enum import Enum
import strawberry
from strawberry.types.enum import StrawberryEnumDefinition, has_enum_definition


@strawberry.enum
class ExampleEnum(Enum):
    pass


has_enum_definition(ExampleEnum)  # True
# Now you can use ExampleEnum.__strawberry_definition__ to access the enum definition

Releases contributed by @Ckk3 via #3999

🍓 0.285.0

10 Nov 22:31

Choose a tag to compare

This release removes support for Apollo Federation v1 and improves Federation v2 support with explicit version control and new directives.

Breaking Changes

  • Removed support for Apollo Federation v1: All schemas now use Federation v2
  • Removed enable_federation_2 parameter: Replaced with federation_version parameter
  • Federation v2 is now always enabled with version 2.11 as the default

Migration

If you were using enable_federation_2=True

Remove the parameter:

# Before
schema = strawberry.federation.Schema(query=Query, enable_federation_2=True)

# After
schema = strawberry.federation.Schema(query=Query)

If you were using Federation v1

You must migrate to Federation v2. See the breaking changes documentation for detailed migration instructions.

New Features

  • Version control: Specify Federation v2 versions (2.0 - 2.11):
schema = strawberry.federation.Schema(
    query=Query, federation_version="2.5"  # Specify a specific version if needed
)
  • New directives: Added support for @context, @fromContext, @cost, and @listSize directives (v2.7+)
  • Automatic validation: Ensures directives are compatible with your chosen federation version
  • Improved performance: Faster version parsing using dictionary lookups

Releases contributed by @patrick91 via #4045

🍓 0.284.4

10 Nov 22:29

Choose a tag to compare

Bumped minimum Typer version to fix strawberry CLI commands.

Releases contributed by @valliu via #4049

🍓 0.284.3

10 Nov 19:47

Choose a tag to compare

Removed Transfer-Encoding: chunked header from multipart streaming responses. This fixes HTTP 405 errors on Vercel and other serverless platforms. The server/gateway will handle chunked encoding automatically when needed.

Releases contributed by @LouisAmon via #4047

🍓 0.284.2

05 Nov 19:14

Choose a tag to compare

Update typing of variables in the test clients to match the actual flexibility of this field.

Releases contributed by @ben-xo via #4044