Strawberry-graphql

Latest version: v0.229.1

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

Scan your dependencies

Page 39 of 119

0.142.2

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

This release changes the dataloader batch resolution to avoid resolving
futures that were canceled, and also from reusing them from the cache.
Trying to resolve a future that was canceled would raise `asyncio.InvalidStateError`

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

0.142.1

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

This release fixes a bug where using a custom scalar in a union would result
in an unclear exception. Instead, when using a custom scalar in a union,
the `InvalidUnionType` exception is raised with a clear message that you
cannot use that type in a union.

Contributed by [Jonathan Kim](https://github.com/jkimbo) via [PR #2336](https://github.com/strawberry-graphql/strawberry/pull/2336/)

0.142.0

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

This release adds support for `typing.Self` and `typing_extensions.Self` for types and interfaces.

python
from typing_extensions import Self


strawberry.type
class Node:
strawberry.field
def field(self) -> Self:
return self


Contributed by [A. Coady](https://github.com/coady) via [PR #2295](https://github.com/strawberry-graphql/strawberry/pull/2295/)

0.141.0

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

This release adds support for an implicit `resolve_reference` method
on Federation type. This method will automatically create a Strawberry
instance for a federation type based on the input data received, for
example, the following:

python
strawberry.federation.type(keys=["id"])
class Something:
id: str


strawberry.federation.type(keys=["upc"])
class Product:
upc: str
something: Something

staticmethod
def resolve_reference(**data):
return Product(upc=data["upc"], something=Something(id=data["something_id"]))


doesn't need the resolve_reference method anymore.

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

0.140.3

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

[Internal] Update StrawberryField so that `type_annotation` is always an instance of StrawberryAnnotation.

Contributed by [Jonathan Kim](https://github.com/jkimbo) via [PR #2319](https://github.com/strawberry-graphql/strawberry/pull/2319/)

0.140.2

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

This release fixes an issue that prevented using enums that
were using strawberry.enum_value, like the following example:

python
from enum import Enum
import strawberry


strawberry.enum
class TestEnum(Enum):
A = strawberry.enum_value("A")
B = "B"


strawberry.type
class Query:
strawberry.field
def receive_enum(self, test: TestEnum) -> int:
return 0


schema = strawberry.Schema(query=Query)


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

Page 39 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.