Strawberry-graphql

Latest version: v0.235.0

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

Scan your dependencies

Page 51 of 122

0.123.3

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

This release fixes a regression introduced in version 0.118.2 which was
preventing using circular dependencies in Strawberry django and Strawberry
django plus.

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

0.123.2

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

This release adds support for priting custom enums used only on
schema directives, for example the following schema:

python
strawberry.enum
class Reason(str, Enum):
EXAMPLE = "example"


strawberry.schema_directive(locations=[Location.FIELD_DEFINITION])
class Sensitive:
reason: Reason


strawberry.type
class Query:
first_name: str = strawberry.field(directives=[Sensitive(reason=Reason.EXAMPLE)])


prints the following:

graphql
directive sensitive(reason: Reason!) on FIELD_DEFINITION

type Query {
firstName: String! sensitive(reason: EXAMPLE)
}

enum Reason {
EXAMPLE
}


while previously it would omit the definition of the enum.

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

0.123.1

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

This release adds support for priting custom scalar used only on
schema directives, for example the following schema:

python
SensitiveConfiguration = strawberry.scalar(str, name="SensitiveConfiguration")


strawberry.schema_directive(locations=[Location.FIELD_DEFINITION])
class Sensitive:
config: SensitiveConfiguration


strawberry.type
class Query:
first_name: str = strawberry.field(directives=[Sensitive(config="Some config")])


prints the following:

graphql
directive sensitive(config: SensitiveConfiguration!) on FIELD_DEFINITION

type Query {
firstName: String! sensitive(config: "Some config")
}

scalar SensitiveConfiguration


while previously it would omit the definition of the scalar.

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

0.123.0

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

This PR adds support for adding schema directives to the schema of
your GraphQL API. For printing the following schema:

python
strawberry.schema_directive(locations=[Location.SCHEMA])
class Tag:
name: str


strawberry.type
class Query:
first_name: str = strawberry.field(directives=[Tag(name="team-1")])


schema = strawberry.Schema(query=Query, schema_directives=[Tag(name="team-1")])


will print the following:

graphql
directive tag(name: String!) on SCHEMA

schema tag(name: "team-1") {
query: Query
}

type Query {
firstName: String!
}
"""


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

0.122.1

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

This release fixes that the AIOHTTP integration ignored the `operationName` of query
operations. This behaviour is a regression introduced in version 0.107.0.

Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #2055](https://github.com/strawberry-graphql/strawberry/pull/2055/)

0.122.0

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

This release adds support for printing default values for scalars like JSON.

For example the following:

python
import strawberry
from strawberry.scalars import JSON


strawberry.input
class MyInput:
j: JSON = strawberry.field(default_factory=dict)
j2: JSON = strawberry.field(default_factory=lambda: {"hello": "world"})


will print the following schema:

graphql
input MyInput {
j: JSON! = {}
j2: JSON! = {hello: "world"}
}


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

Page 51 of 122

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.