Strawberry GraphQL

Strawberry GraphQL

@strawberry.rocks

16 followers4 following91 posts

Strawberry GraphQL Django 0.93.0 has been released! Filter and order methods, declared with @strawberry_django.filter_field or @strawberry_django.order_field, no longer use Strawberry's field resolver. The method is now stored in the field's filter_order_resolver attribute instead of...

Strawberry GraphQL 0.332.0 has been released! This release adds a check for the fields of OneOf input types, when the schema is built. GraphQL requires them to be nullable and without a default value, as clients set exactly one of them, but Strawberry didn't check it: import strawberry...

Strawberry GraphQL Django 0.92.3 has been released! Fix a regression from 0.92.0: in async execution, prefetched list fields went through Django's QuerySet.aiter, which hops to a thread even for cached results. This could split DataLoader batches of child resolvers into extra queries.

Strawberry GraphQL Django 0.92.2 has been released! Fix the optimizer ignoring fragments on connection edge types when a node is exposed through both a DjangoCursorConnection and a DjangoListConnection (N+1). The optimizer now takes the edge type from the connection's edges field instead of...

Strawberry GraphQL 0.331.2 has been released! This release fixes a bug with nullable input fields. Given the following Strawberry schema: @strawberry.input class RunInput: required: int optional: str | None @strawberry.type class Mutation: @strawberry.mutation def run(self,...

Strawberry GraphQL 0.331.1 has been released! This release fixes import strawberry importing pydantic whenever it's installed, which slowed down the startup of every app, including the ones that don't use pydantic, and made Strawberry impossible to import when the installed pydantic was...

Strawberry GraphQL 0.331.0 has been released! This release fixes strawberry.field() options in Annotated being silently ignored on Python 3.10 to 3.13, when the field's type isn't defined yet when the Strawberry type is created. For example, with a type defined further down the module: from...

Strawberry GraphQL 0.330.3 has been released! This release fixes classmethod resolvers inherited by a subclass being called with the class that defined them as cls, instead of the subclass. For example, { dog { says } } now returns "Dog says woof", and so does Dog.says(): from typing import...

Strawberry GraphQL Django 0.92.1 has been released! Reuse a single helper to resolve connection edge types and reduce duplication in relay connection handling logic.

Strawberry GraphQL 0.330.2 has been released! This release fixes types that inherit an interface through a class that isn't decorated with Strawberry. Strawberry listed the interface more than once for these types, so building the schema failed with errors like Type Fruit can only implement...

Strawberry GraphQL 0.330.1 has been released! This release fixes list defaults of arguments and input fields being shared between requests. When a client omitted an argument or input field whose default is a list of scalars or enums, every request got the same list. A resolver that changed...

Strawberry GraphQL 0.330.0 has been released! This release adds a to_input hook to StrawberryObjectDefinition, the counterpart of from_input. Like from_input, it's meant for integrations that create their own type definitions, which pass it when they create the definition. It isn't meant to be...

Strawberry GraphQL 0.329.0 has been released! This release adds a from_input hook to StrawberryObjectDefinition, for integrations that create their own type definitions, like the first-class Pydantic integration. It lets them build input values their own way, for example to validate a whole...

Strawberry GraphQL 0.328.3 has been released! This release fixes argument and input field defaults that are instances of an input type: @strawberry.input class Filter: limit: int = 10 @strawberry.type class Query: @strawberry.field def items(self, filter: Filter =...

Strawberry GraphQL 0.328.2 has been released! This release fixes objects cast with strawberry.cast not being resolved when they're returned in a union. Resolvers can return objects that aren't instances of a union's types, like rows of an ORM, by casting them to the type they represent:...

Strawberry GraphQL 0.328.1 has been released! This release fixes unions with the same name but different types. Strawberry reused a union by its name without checking its types, so a union whose generated name matched another union, for example Ok | Error with two different Error types, was...

Strawberry GraphQL Django 0.92.0 has been released! Require strawberry-graphql>=0.328.0, which requires graphql-core>=3.3.0. - Removed strawberry_django.utils.IS_GQL_32 and IS_GQL_33. - StrawberryDjangoField.get_result returns an unevaluated QuerySet for list fields. graphql-core fetches it...

Strawberry GraphQL Django 0.91.0 has been released! All GeoDjango geometry scalars now accept WKT, EWKT, HEXEWKB and GeoJSON (as a string or an object) as input. Before, the geometry-specific scalars (Point, LineString, LinearRing, Polygon, MultiPoint, MultiLineString and MultiPolygon) only...

Strawberry GraphQL Django 0.90.1 has been released! Fix an N+1 query regression when a field declares a prefetch_related hint and its resolver returns the prefetched related manager's queryset, for example: @strawberry_django.type(Author) class AuthorType:...

Strawberry GraphQL Django 0.90.0 has been released! Add GeometryFilterLookup, which adds spatial lookups to the filters of GeoDjango geometry fields. When GeoDjango is installed, filters created with lookups=True use GeometryFilterLookup for geometry fields (PointField, PolygonField,...

Strawberry GraphQL Django 0.89.2 has been released! Fix nullable connections (e.g. when guarded by a permission extension) eagerly fetching the entire table before the connection applied its pagination. The return type is now unwrapped from StrawberryOptional/other containers so the queryset...

Strawberry GraphQL Django 0.89.1 has been released! Permission extensions are now fully compatible with strawberry-graphql >= 0.326.0, which enforces strict type uniqueness for custom schema directives during schema construction. Previously, DjangoPermissionExtension.schema_directive created...

Strawberry GraphQL Django 0.89.0 has been released! Require Strawberry GraphQL 0.322.2 or newer, which fixes Relay pagination when combining first with before. Update compatibility tests for the corrected pagination behavior and make schema comparisons independent of top-level definition...

Strawberry GraphQL 0.327.7 has been released! This release fixes unnecessary overhead when handling resolver results. Strawberry now does a little less work to check whether a result needs to be awaited. This small optimization works automatically with your existing synchronous and...

Strawberry GraphQL 0.327.6 has been released! This release fixes unnecessary whitespace in responses produced by Strawberry's shared default JSON encoders, reducing their size without changing decoded data. The encoders now omit spaces after commas and colons. This also applies to WebSocket...

Strawberry GraphQL 0.327.5 has been released! This release fixes Channels HTTP responses bypassing custom encode_json overrides. Both GraphQLHTTPConsumer and SyncGraphQLHTTPConsumer now use the encoding hook for single and batched JSON responses, including GraphQL errors. Bytes are sent...

Strawberry GraphQL Django 0.88.1 has been released! Permission extensions are now fully compatible with strawberry-graphql >= 0.326.0, which enforces strict type uniqueness for custom schema directives during schema construction. Previously, DjangoPermissionExtension.schema_directive created...

Strawberry GraphQL 0.327.4 has been released! This release fixes unnecessary allocation and enqueue overhead in DataLoader. Batch entries now use slotted dataclasses and avoid runtime generic construction. Batch selection also avoids repeated attribute lookups and length-method calls....

Strawberry GraphQL 0.327.3 has been released! This release fixes classification of built-in scalar and OneOf input errors. Strawberry now raises StrawberryInputCoercionError for these client input errors, allowing server-side error handling and monitoring to distinguish them from server...

Strawberry GraphQL 0.327.2 has been released! This release fixes the legacy graphql-ws protocol handler so that subscriptions which complete on their own (or fail before execution) release their slot on the connection. Previously, completed operations were kept in the handler's bookkeeping...

Strawberry GraphQL 0.327.1 has been released! This release adds continuous compatibility testing against the latest Strawberry Django release. Strawberry pull requests now run the complete Strawberry Django test suite using the proposed Strawberry changes.

Strawberry GraphQL 0.327.0 has been released! This release fixes a potential unbounded memory growth in the ParserCache and ValidationCache extensions. Both extensions previously defaulted to maxsize=None, which creates an unbounded functools.lru_cache. On a network-exposed endpoint with one...

Strawberry GraphQL 0.326.1 has been released! This release fixes a permission bypass (GHSA-pfvf-fwfp-25mp) where a custom permission could unintentionally authorize access to a protected field. When a permission's has_permission was a normal def that returned an awaitable (for example a...

Strawberry GraphQL 0.326.0 has been released! This release fixes introspection for custom schema directives. Schema directives attached to types, fields, arguments, and other schema elements now appear in standard GraphQL introspection. Schema explorers, IDEs, code generators, and other tools...

Strawberry GraphQL 0.325.0 has been released! This release adds richer verbose output to assert_no_errors. When GraphQL errors are detected, the assertion now includes full error details, making it easier to debug failing tests.

Strawberry GraphQL 0.324.5 has been released! This release fixes incorrect dataclass transform ordering metadata. Strawberry decorators now correctly declare that ordering methods are not generated by default, matching their runtime dataclass behavior and allowing custom ordering methods such...

Strawberry GraphQL Django 0.88.0 has been released! Allow mutations with Django error handling to return interfaces by expanding them to their concrete implementations.

Strawberry GraphQL 0.324.4 has been released! This release fixes argument handling for operation directive resolvers. Arguments passed to operation directives now use GraphQL's standard coercion before your resolver runs. Directive resolvers receive Python numeric values, Strawberry enum...

Strawberry GraphQL 0.324.3 has been released! This release fixes silently ignored strawberry.field() metadata in nested type annotations. Strawberry now raises a clear error when field metadata is placed below the class-field annotation, such as on a list item, and explains that it must be...

Strawberry GraphQL 0.324.2 has been released! This release fixes fields configured with strawberry.field() inside typing.Annotated. You can now use this syntax consistently on object types, input types, and interfaces, including in projects that use from future import annotations: from...

Strawberry GraphQL Django 0.87.1 has been released! Fix the query optimizer dropping a manually applied select_related from the only() mask when another field on the same model shares its name as a prefix without a boundary (e.g. company vs company_branch). This previously made Django raise...

Strawberry GraphQL 0.324.0 has been released! This release adds support for Django 6.0 and 6.1, and drops support for Django older than 5.2. Django 4.2, 5.0 and 5.1 have all reached end of life. Django 5.2 LTS is now the minimum supported version, and the test suite runs against Django 5.2,...

Strawberry GraphQL Django 0.87.0 has been released! Resolve prefetch-optimized nested connections on the event loop instead of paying a sync_to_async thread hop per parent node: the nested-connection default resolver, the queryset hook for prefetch-optimized querysets and totalCount served...

Strawberry GraphQL Django 0.86.8 has been released! The built-in toolbar script is now compatible with django-debug-toolbar 7.0.0, which renders the toolbar inside a shadow DOM by default. Previously, all DOM queries targeted #djDebug directly on the document, which broke under shadow DOM...

Strawberry GraphQL Django 0.86.7 has been released! Honor the DEFAULT_PK_FIELD_NAME setting (and per-field key_attr) when resolving existing instances in mutation inputs. Previously _parse_pk read the input value under key_attr but always looked the instance up by pk=, so relation inputs and...

Strawberry GraphQL Django 0.86.6 has been released! Fix an N+1 on totalCount of nested connections optimized by prefetching: parents whose prefetched first-page partition came back empty issued one COUNT(*) query each, even though an empty first page already proves the total count is 0.

Strawberry GraphQL 0.323.2 has been released! This release fixes an issue where MaskErrors leaked parsing and validation error details during synchronous execution. Synchronous execution now masks pre-execution errors consistently with asynchronous execution, including when ValidationCache is...

Strawberry GraphQL 0.323.1 has been released! This release fixes type checking for FastAPI GraphQLRouter subclasses that provide a custom context getter without explicit generic parameters. Bare subclasses now default to the context types supported by the FastAPI integration, so valid context...