Strawberry-graphql

Latest version: v0.229.1

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

Scan your dependencies

Page 63 of 119

0.93.23

Not secure
--------------------

Improve typing of `strawberry.enum()` by:

1. Using a `TypeVar` bound on `EnumMeta` instead of `EnumMeta`, which allows
type-checkers (like pyright) to detect the fields of the enum being
decorated. For example, for the following enum:

python
strawberry.enum
class IceCreamFlavour(Enum):
VANILLA = "vanilla"
STRAWBERRY = "strawberry"
CHOCOLATE = "chocolate"


Prior to this change, pyright would complain if you tried to access
`IceCreamFlavour.VANILLA`, since the type information of `IceCreamFlavour` was
being erased by the `EnumMeta` typing .

2. Overloading it so that type-checkers (like pyright) knows in what cases it
returns a decorator (when it's called with keyword arguments, e.g.
`strawberry.enum(name="IceCreamFlavor")`), versus when it returns the
original enum type (without keyword arguments.

Contributed by [Tim Joseph Dumol](https://github.com/TimDumol) [PR #1568](https://github.com/strawberry-graphql/strawberry/pull/1568/)

0.93.22

Not secure
--------------------

This release adds `load_many` to `DataLoader`.

Contributed by [Silas Sewell](https://github.com/silas) [PR #1528](https://github.com/strawberry-graphql/strawberry/pull/1528/)

0.93.21

Not secure
--------------------

This release adds `deprecation_reason` support to arguments and mutations.

Contributed by [Silas Sewell](https://github.com/silas) [PR #1527](https://github.com/strawberry-graphql/strawberry/pull/1527/)

0.93.20

Not secure
--------------------

This release checks for AutoFieldsNotInBaseModelError when converting from pydantic models.
It is raised when strawberry.auto is used, but the pydantic model does not have
the particular field defined.

python
class User(BaseModel):
age: int


strawberry.experimental.pydantic.type(User)
class UserType:
age: strawberry.auto
password: strawberry.auto


Previously no errors would be raised, and the password field would not appear on graphql schema.
Such mistakes could be common during refactoring. Now, AutoFieldsNotInBaseModelError is raised.

Contributed by [James Chua](https://github.com/thejaminator) [PR #1551](https://github.com/strawberry-graphql/strawberry/pull/1551/)

0.93.19

Not secure
--------------------

Fixes TypeError when converting a pydantic BaseModel with NewType field

Contributed by [James Chua](https://github.com/thejaminator) [PR #1547](https://github.com/strawberry-graphql/strawberry/pull/1547/)

0.93.18

Not secure
--------------------

This release allows setting http headers and custom http status codes with FastAPI GraphQLRouter.

Contributed by [David Němec](https://github.com/davidnemec) [PR #1537](https://github.com/strawberry-graphql/strawberry/pull/1537/)

Page 63 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.