Skip to content

Releases: strawberry-graphql/strawberry

馃崜 0.231.1

25 May 10:15
Compare
Choose a tag to compare

Fixes an issue where lazy annotations raised an error when used together with a List

Releases contributed by @jeich via #3388

馃崜 0.231.0

25 May 09:10
Compare
Choose a tag to compare

When calling the CLI without all the necessary dependencies installed,
a MissingOptionalDependenciesError will be raised instead of a
ModuleNotFoundError. This new exception will provide a more helpful
hint regarding how to fix the problem.

Releases contributed by @parafoxia via #3511

馃崜 0.230.0

22 May 17:33
Compare
Choose a tag to compare

This release adds support for @oneOf on input types! 馃帀 You can use
one_of=True on input types to create an input type that should only have one
of the fields set.

import strawberry


@strawberry.input(one_of=True)
class ExampleInputTagged:
    a: str | None = strawberry.UNSET
    b: int | None = strawberry.UNSET

Releases contributed by @patrick91 via #3429

馃崜 0.229.2

22 May 14:18
Compare
Choose a tag to compare

This release fixes an issue when using Annotated + strawberry.lazy +
deferred annotations such as:

from __future__ import annotations
import strawberry
from typing import Annotated


@strawberry.type
class Query:
    a: Annotated["datetime", strawberry.lazy("datetime")]


schema = strawberry.Schema(Query)

Before this would only work if datetime was not inside quotes. Now it should
work as expected!

Releases contributed by @bellini666 via #3507

馃崜 0.229.1

15 May 18:39
Compare
Choose a tag to compare

This release fixes a regression from 0.229.0 where using a generic interface
inside a union would return an error.

Releases contributed by @patrick91 via #3502

馃崜 0.229.0

12 May 11:28
Compare
Choose a tag to compare

This release improves our support for generic types, now using the same the same
generic multiple times with a list inside an interface or union is supported,
for example the following will work:

import strawberry


@strawberry.type
class BlockRow[T]:
    items: list[T]


@strawberry.type
class Query:
    @strawberry.field
    def blocks(self) -> list[BlockRow[str] | BlockRow[int]]:
        return [
            BlockRow(items=["a", "b", "c"]),
            BlockRow(items=[1, 2, 3, 4]),
        ]


schema = strawberry.Schema(query=Query)

Releases contributed by @patrick91 via #3463

馃崜 0.228.0

12 May 11:00
Compare
Choose a tag to compare

This releases updates the JSON scalar definition to have the updated specifiedBy URL.

The release is marked as minor because it will change the generated schema if you're using the JSON scalar.

Releases contributed by @Birdi7 via #3478

馃崜 0.227.7

12 May 09:21
Compare
Choose a tag to compare

This releases updates the field-extensions documentation's StrawberryField stability warning to include stable features.

The release is marked as patch because it only changes documentation.

Releases contributed by @fireteam99 via #3496

馃崜 0.227.6

11 May 18:15
Compare
Choose a tag to compare

Fix AssertionError caused by the DatadogTracingExtension whenever the query is unavailable.

The bug in question was reported by issue #3150.
The datadog extension would throw an AssertionError whenever there was no query available. This could happen if,
for example, a user POSTed something to /graphql with a JSON that doesn't contain a query field as per the
GraphQL spec.

The fix consists of adding query_missing to the operation_type tag, and also adding query_missing to the resource name.
It also makes it easier to look for logs of users making invalid queries by searching for query_missing in Datadog.

Releases contributed by @serramatutu via #3483

馃崜 0.227.5

11 May 15:24
Compare
Choose a tag to compare

Deprecations: This release deprecates the Starlite integration in favour of the LiteStar integration.
Refer to the LiteStar integration for more information.
LiteStar is a renamed and upgraded version of Starlite.

Before:

from strawberry.starlite import make_graphql_controller

After:

from strawberry.litestar import make_graphql_controller

Releases contributed by @Birdi7 via #3492