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 109 of 119

0.25.3

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

Improves tooling by updating `pre-commit` hooks and adding `pre-commit` to
`pyproject.toml`.

0.25.2

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

Add support for setting `root_value` in asgi.

Usage:
python
schema = strawberry.Schema(query=Query)
app = strawberry.asgi.GraphQL(schema, root_value=Query())

0.25.1

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

Fix error when a subscription accepted input arguments

0.25.0

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

This release add supports for named unions, now you can create
a new union type by writing:

python
Result = strawberry.union("Result", (A, B), description="Example Result")


This also improves the support for Union and Generic types, as it
was broken before.

0.24.1

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

This release fixes a bug introduced by 0.24.0

0.24.0

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

This releases allows to use resolver without having
to specify root and info arguments:

python
def function_resolver() -> str:
return "I'm a function resolver"


def function_resolver_with_params(x: str) -> str:
return f"I'm {x}"


strawberry.type
class Query:
hello: str = strawberry.field(resolver=function_resolver)
hello_with_params: str = strawberry.field(resolver=function_resolver_with_params)


strawberry.type
class Query:
strawberry.field
def hello(self) -> str:
return "I'm a function resolver"

strawberry.field
def hello_with_params(self, x: str) -> str:
return f"I'm {x}"


This makes it easier to reuse existing functions and makes code
cleaner when not using info or root.

Page 109 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.