Strawberry-graphql

Latest version: v0.229.1

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

Scan your dependencies

Page 33 of 119

0.158.1

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

0.158.0

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

Throw proper exceptions when Unions are created with invalid types

Previously, using Lazy types inside of Unions would raise unexpected, unhelpful errors.

Contributed by [ignormies](https://github.com/BryceBeagle) via [PR #2540](https://github.com/strawberry-graphql/strawberry/pull/2540/)

0.157.0

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

This releases adds support for Apollo Federation 2.1, 2.2 and 2.3.

This includes support for `composeDirective` and `interfaceObject`,
we expose directives for both, but we also have shortcuts, for example
to use `composeDirective` with a custom schema directive, you can do
the following:

python
strawberry.federation.schema_directive(
locations=[Location.OBJECT], name="cacheControl", compose=True
)
class CacheControl:
max_age: int


The `compose=True` makes so that this directive is included in the supergraph
schema.

For `interfaceObject` we introduced a new `strawberry.federation.interface_object`
decorator. This works like `strawberry.federation.type`, but it adds, the appropriate
directive, for example:

python
strawberry.federation.interface_object(keys=["id"])
class SomeInterface:
id: strawberry.ID


generates the following type:

graphql
type SomeInterface key(fields: "id") interfaceObject {
id: ID!
}


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

0.156.4

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

This release fixes a regression introduce in version 0.156.2 that
would make Mypy throw an error in the following code:

python
import strawberry


strawberry.type
class Author:
name: str


strawberry.type
class Query:
strawberry.field
async def get_authors(self) -> list[Author]:
return [Author(name="Michael Crichton")]


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

0.156.3

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

0.156.2

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

This release updates the typing for the resolver argument in
`strawberry.field`i to support async resolvers.
This means that now you won't get any type
error from Pyright when using async resolver, like the following example:

python
import strawberry


async def get_user_age() -> int:
return 0


strawberry.type
class User:
name: str
age: int = strawberry.field(resolver=get_user_age)


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

Page 33 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.