Strawberry-graphql

Latest version: v0.235.0

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

Scan your dependencies

Page 14 of 122

0.209.3

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

Mark Django's asyncview as a coroutine using `asgiref.sync.markcoroutinefunction`
to support using it with Python 3.12.

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

0.209.2

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

Fix generation of input based on pydantic models using nested `Annotated` type annotations:

python
import strawberry
from pydantic import BaseModel


class User(BaseModel):
age: Optional[Annotated[int, "metadata"]]


strawberry.experimental.pydantic.input(all_fields=True)
class UserInput:
pass


Contributed by [Matthieu MN](https://github.com/gazorby) via [PR #3109](https://github.com/strawberry-graphql/strawberry/pull/3109/)

0.209.1

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

This release fixes an issue when trying to generate code from a schema that
was using double quotes inside descriptions.

The following schema will now generate code correctly:

graphql
"""
A type of person or character within the "Star Wars" Universe.
"""
type Species {
"""
The classification of this species, such as "mammal" or "reptile".
"""
classification: String!
}


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

0.209.0

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

This release adds support for generating Strawberry types from SDL files. For example, given the following SDL file:

graphql
type Query {
user: User
}

type User {
id: ID!
name: String!
}


you can run

bash
strawberry schema-codegen schema.graphql


to generate the following Python code:

python
import strawberry


strawberry.type
class Query:
user: User | None


strawberry.type
class User:
id: strawberry.ID
name: str


schema = strawberry.Schema(query=Query)


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

0.208.3

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

Adding support for additional pydantic built in types like EmailStr or PostgresDsn.

Contributed by [ppease](https://github.com/ppease) via [PR #3101](https://github.com/strawberry-graphql/strawberry/pull/3101/)

0.208.2

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

This release fixes an issue that would prevent using generics with unnamed
unions, like in this example:

python
from typing import Generic, TypeVar, Union
import strawberry

T = TypeVar("T")


strawberry.type
class Connection(Generic[T]):
nodes: list[T]


strawberry.type
class Entity1:
id: int


strawberry.type
class Entity2:
id: int


strawberry.type
class Query:
entities: Connection[Union[Entity1, Entity2]]


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

Page 14 of 122

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.