Strawberry-graphql

Latest version: v0.235.0

Safety actively analyzes 638430 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 122

0.232.0

--------------------

This release improves type checking for async resolver functions when used as
`strawberry.field(resolver=resolver_func)`.

Now doing this will raise a type error:

python
import strawberry


def some_resolver() -> int:
return 0


strawberry.type
class User:
Note the field being typed as str instead of int
name: str = strawberry.field(resolver=some_resolver)


Contributed by [Bryan Ricker](https://github.com/bricker) via [PR #3241](https://github.com/strawberry-graphql/strawberry/pull/3241/)

0.231.1

--------------------

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

Contributed by [jeich](https://github.com/jeich) via [PR #3388](https://github.com/strawberry-graphql/strawberry/pull/3388/)

0.231.0

--------------------

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.

Contributed by [Ethan Henderson](https://github.com/parafoxia) via [PR #3511](https://github.com/strawberry-graphql/strawberry/pull/3511/)

0.230.0

--------------------

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.

python
import strawberry


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


Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #3429](https://github.com/strawberry-graphql/strawberry/pull/3429/)

0.229.2

--------------------

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

python
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!

Contributed by [Thiago Bellini Ribeiro](https://github.com/bellini666) via [PR #3507](https://github.com/strawberry-graphql/strawberry/pull/3507/)

0.229.1

--------------------

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

Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #3502](https://github.com/strawberry-graphql/strawberry/pull/3502/)

Page 5 of 122

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.