Strawberry-graphql

Latest version: v0.263.0

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

Scan your dependencies

Page 100 of 133

0.61.3

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

Fix `requires(fields: ["email"])` and `provides(fields: ["name"])` usage on a Federation field

You can use `requires` to specify which fields you need to resolve a field

python
import strawberry


strawberry.federation.type(keys=["id"], extend=True)
class Product:
id: strawberry.ID = strawberry.federation.field(external=True)
code: str = strawberry.federation.field(external=True)

classmethod
def resolve_reference(cls, id: strawberry.ID, code: str):
return cls(id=id, code=code)

strawberry.federation.field(requires=["code"])
def my_code(self) -> str:
return self.code


`provides` can be used to specify what fields are going to be resolved
by the service itself without having the Gateway to contact the external service
to resolve them.

0.61.2

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

This release adds support for the info param in resolve_reference:

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

classmethod
def resolve_reference(cls, info, upc):
return Product(upc, info)


> Note: resolver reference is used when using Federation, similar to [Apollo server's __resolveReference](https://apollographql.com/docs/federation/api/apollo-federation/#__resolvereference)

0.61.1

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

This release extends the `strawberry server` command to allow the specification
of a schema symbol name within a module:

sh
strawberry server mypackage.mymodule:myschema


The schema symbol name defaults to `schema` making this change backwards compatible.

0.61.0

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

This release adds file upload support to the [Sanic](https://sanicframework.org)
integration. No additional configuration is required to enable file upload support.

The following example shows how a file upload based mutation could look like:

python
import strawberry
from strawberry.file_uploads import Upload


strawberry.type
class Mutation:
strawberry.mutation
def read_text(self, text_file: Upload) -> str:
return text_file.read().decode()

0.60.0

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

This release adds an `export-schema` command to the Strawberry CLI.
Using the command you can print your schema definition to your console.
Pipes and redirection can be used to store the schema in a file.

Example usage:

sh
strawberry export-schema mypackage.mymodule:myschema > schema.graphql

0.59.1

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

This release fixes an issue that prevented using `source` as name of an argument

Page 100 of 133

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.