Strawberry-graphql

Latest version: v0.235.0

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

Scan your dependencies

Page 29 of 122

0.177.2

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

This release fixes an issue with optional scalars using the `or`
notation with forward references on python 3.10.

The following code would previously raise `TypeError` on python 3.10:

python
from __future__ import annotations

import strawberry
from strawberry.scalars import JSON


strawberry.type
class SomeType:
an_optional_json: JSON | None


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

0.177.1

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

This release adds support for using `enum_value` with `IntEnum`s, like this:

python
import strawberry

from enum import IntEnum


strawberry.enum
class Color(IntEnum):
OTHER = strawberry.enum_value(
-1, description="Other: The color is not red, blue, or green."
)
RED = strawberry.enum_value(0, description="Red: The color red.")
BLUE = strawberry.enum_value(1, description="Blue: The color blue.")
GREEN = strawberry.enum_value(2, description="Green: The color green.")


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

0.177.0

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

This release adds a SentryTracingExtension that you can use to automatically add
tracing information to your GraphQL queries.

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

0.176.4

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

This release adds support for custom classes inside the OpenTelemetry integration.
With this, we shouldn't see errors like this anymore:

Invalid type dict for attribute 'graphql.param.paginator' value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types.

Contributed by [Budida Abhinav Ramana](https://github.com/abhinavramana) via [PR #2753](https://github.com/strawberry-graphql/strawberry/pull/2753/)

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/)

Page 29 of 122

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.