Releases: strawberry-graphql/strawberry
🍓 0.287.3
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
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.
🍓 0.287.1
🍓 0.287.0
🍓 0.286.1
🍓 0.286.0
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🍓 0.285.0
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_2parameter: Replaced withfederation_versionparameter - 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@listSizedirectives (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
🍓 0.284.3
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