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

0.176.3

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

Add `get_argument_definition` helper function on the Info object to get
a StrawberryArgument definition by argument name from inside a resolver or
Field Extension.

Example:

python
import strawberry


strawberry.type
class Query:
strawberry.field
def field(
self,
info,
my_input: Annotated[
str,
strawberry.argument(description="Some description"),
],
) -> str:
my_input_def = info.get_argument_definition("my_input")
assert my_input_def.type is str
assert my_input_def.description == "Some description"

return my_input


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

0.176.2

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

This release adds more type hints to internal APIs and public APIs.

Contributed by [Alex Auritt](https://github.com/alexauritt) via [PR #2568](https://github.com/strawberry-graphql/strawberry/pull/2568/)

0.176.1

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

This release improves the `graphql-transport-ws` implementation by starting the sub-protocol timeout only when the connection handshake is completed.

Contributed by [Kristján Valur Jónsson](https://github.com/kristjanvalur) via [PR #2703](https://github.com/strawberry-graphql/strawberry/pull/2703/)

0.176.0

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

This release parses the input arguments to a field earlier so that Field
Extensions recieve instances of Input types rather than plain dictionaries.

Example:

python
import strawberry
from strawberry.extensions import FieldExtension


strawberry.input
class MyInput:
foo: str


class MyFieldExtension(FieldExtension):
def resolve(
self, next_: Callable[..., Any], source: Any, info: strawberry.Info, **kwargs
):
kwargs["my_input"] is instance of MyInput
...


strawberry.type
class Query:
strawberry.field
def field(self, my_input: MyInput) -> str:
return "hi"


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

0.175.1

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

This release adds a missing parameter to `get_context`
when using subscriptions with ASGI.

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

0.175.0

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

Do not display graphiql view in fastapi doc if graphiql parameter is deactivated

Contributed by [yak-toto](https://github.com/yak-toto) via [PR #2736](https://github.com/strawberry-graphql/strawberry/pull/2736/)

Page 27 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.