pypi strawberry-graphql 0.265.0
🍓 0.265.0

latest releases: 0.287.3, 0.287.2, 0.287.1...
8 months ago

This release adds support for using strawberry.union with generics, like in this
example:

@strawberry.type
class ObjectQueries[T]:
    @strawberry.field
    def by_id(
        self, id: strawberry.ID
    ) -> Union[T, Annotated[NotFoundError, strawberry.union("ByIdResult")]]: ...


@strawberry.type
class Query:
    @strawberry.field
    def some_type_queries(self, id: strawberry.ID) -> ObjectQueries[SomeType]: ...

which, now, creates a correct union type named SomeTypeByIdResult

Releases contributed by @enoua5 via #3515

Don't miss a new strawberry-graphql release

NewReleases is sending notifications on new releases.