Strawberry-graphql

Latest version: v0.229.1

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

Scan your dependencies

Page 30 of 119

0.168.0

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

This release adds support for [starlite](https://starliteproject.dev/).

python
import strawberry
from starlite import Request, Starlite
from strawberry.starlite import make_graphql_controller
from strawberry.types.info import Info


def custom_context_getter(request: Request):
return {"custom": "context"}


strawberry.type
class Query:
strawberry.field
def hello(self, info: strawberry.Info[object, None]) -> str:
return info.context["custom"]


schema = strawberry.Schema(Query)


GraphQLController = make_graphql_controller(
schema,
path="/graphql",
context_getter=custom_context_getter,
)

app = Starlite(
route_handlers=[GraphQLController],
)


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

0.167.1

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

This release fixes and issue where you'd get a warning
about using Apollo Federation directives even when using
`strawberry.federation.Schema`.

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

0.167.0

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

This releases adds more type annotations for public functions and methods.

No new changes have been added to the API.

Contributed by [Jad Haddad](https://github.com/JadHADDAD92) via [PR #2627](https://github.com/strawberry-graphql/strawberry/pull/2627/)

0.166.0

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

This release adds a warning when using `strawberry.federation.type`
but not using `strawberry.federation.Schema`

Contributed by [Rubens O Leão](https://github.com/rubensoleao) via [PR #2572](https://github.com/strawberry-graphql/strawberry/pull/2572/)

0.165.1

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

Updates the `MaskErrors` extension to the new extension API, which was missed previously.

Contributed by [Nikolai Maas](https://github.com/N-Maas) via [PR #2655](https://github.com/strawberry-graphql/strawberry/pull/2655/)

0.165.0

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

Add full support for forward references, specially when using
`from __future__ import annotations`.

Before the following would fail on python versions older than 3.10:

python
from __future__ import annotations

import strawberry


strawberry.type
class Query:
foo: str | None


Also, this would fail in any python versions:

python
from __future__ import annotations

from typing import Annotated

import strawberry


strawberry.type
class Query:
foo: Annotated[str, "some annotation"]


Now both of these cases are supported.
Please open an issue if you find any edge cases that are still not supported.

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

Page 30 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.