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 115 of 133

0.37.0

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

Add support for adding a description to field arguments using the [`Annotated`](https://docs.python.org/3/library/typing.html#typing.Annotated) type:

python
from typing import Annotated


strawberry.type
class Query:
strawberry.field
def user_by_id(
id: Annotated[str, strawberry.argument(description="The ID of the user")],
) -> User: ...


which results in the following schema:

graphql
type Query {
userById(
"""The ID of the user"""
id: String
): User!
}


**Note:** if you are not using Python v3.9 or greater you will need to import `Annotated` from `typing_extensions`

0.36.4

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

This release adds support for using strawberry.enum as a function with MyPy,
this is now valid typed code:

python
from enum import Enum

import strawberry


class IceCreamFlavour(Enum):
VANILLA = "vanilla"
STRAWBERRY = "strawberry"
CHOCOLATE = "chocolate"


Flavour = strawberry.enum(IceCreamFlavour)

0.36.3

-------------------

Add `__str__` to `Schema` to allow printing schema sdl with `str(schema)`

0.36.2

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

Extend support for parsing isoformat datetimes,
adding a dependency on the `dateutil` library.
For example: "2020-10-12T22:00:00.000Z"
can now be parsed as a datetime with a UTC timezone.

0.36.1

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

Add `schema.introspect()` method to return introspection result of the schema.
This might be useful for tools like `apollo codegen` or `graphql-voyager` which
expect a full json representation of the schema

0.36.0

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

This releases adds a new extension for OpenTelemetry.

python
import asyncio

from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
SimpleExportSpanProcessor,
)

import strawberry
from strawberry.extensions.tracing import OpenTelemetryExtension


trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
SimpleExportSpanProcessor(ConsoleSpanExporter())
)


strawberry.type
class User:
name: str


strawberry.type
class Query:
strawberry.field
async def user(self, name: str) -> User:
await asyncio.sleep(0.1)
return User(name)


schema = strawberry.Schema(Query, extensions=[OpenTelemetryExtension])

Page 115 of 133

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.