Strawberry-graphql

Latest version: v0.235.0

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

Scan your dependencies

Page 55 of 122

0.114.6

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

The federation decorator now allows for a list of additional arbitrary schema
directives extending the key/shareable directives used for federation.

Example Python:

python
import strawberry
from strawberry.schema.config import StrawberryConfig
from strawberry.schema_directive import Location


strawberry.schema_directive(locations=[Location.OBJECT])
class CacheControl:
max_age: int


strawberry.federation.type(
keys=["id"], shareable=True, extend=True, directives=[CacheControl(max_age=42)]
)
class FederatedType:
id: strawberry.ID


schema = strawberry.Schema(query=Query, config=StrawberryConfig(auto_camel_case=False))


Resulting GQL Schema:

graphql
directive CacheControl(max_age: Int!) on OBJECT
directive key(fields: _FieldSet!, resolvable: Boolean) on OBJECT | INTERFACE
directive shareable on FIELD_DEFINITION | OBJECT

extend type FederatedType
key(fields: "id")
shareable
CacheControl(max_age: 42) {
id: ID!
}

type Query {
federatedType: FederatedType!
}


Contributed by [Jeffrey DeFond](https://github.com/defond0) via [PR #1945](https://github.com/strawberry-graphql/strawberry/pull/1945/)

0.114.5

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

This release adds support in Mypy for using strawberry.mutation
while passing a resolver, the following now doesn't make Mypy return
an error:

python
import strawberry


def set_name(self, name: str) -> None:
self.name = name


strawberry.type
class Mutation:
set_name: None = strawberry.mutation(resolver=set_name)


Contributed by [Etty](https://github.com/estyxx) via [PR #1966](https://github.com/strawberry-graphql/strawberry/pull/1966/)

0.114.4

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

This release fixes the type annotation of `Response.errors` used in the `GraphQLTestClient` to be a `List` of `GraphQLFormattedError`.

Contributed by [Etty](https://github.com/estyxx) via [PR #1961](https://github.com/strawberry-graphql/strawberry/pull/1961/)

0.114.3

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

This release fixes the type annotation of `Response.errors` used in the `GraphQLTestClient` to be a `List` of `GraphQLError`.

Contributed by [Etty](https://github.com/estyxx) via [PR #1959](https://github.com/strawberry-graphql/strawberry/pull/1959/)

0.114.2

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

This release fixes an issue in the `GraphQLTestClient` when using both variables and files together.

Contributed by [Etty](https://github.com/estyxx) via [PR #1576](https://github.com/strawberry-graphql/strawberry/pull/1576/)

0.114.1

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

Fix crash in Django's `HttpResponse.__repr__` by handling `status_code=None` in `TemporalHttpResponse.__repr__`.

Contributed by [Daniel Hahler](https://github.com/blueyed) via [PR #1950](https://github.com/strawberry-graphql/strawberry/pull/1950/)

Page 55 of 122

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.