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 56 of 119

0.106.2

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

Allow all data types in `Schema(types=[...])`

Contributed by [Paulo Costa](https://github.com/paulo-raca) via [PR #1714](https://github.com/strawberry-graphql/strawberry/pull/1714/)

0.106.1

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

This release fixes a number of problems with single-result-operations over
`graphql-transport-ws` protocol

- operation **IDs** now share the same namespace as streaming operations
meaning that they cannot be reused while the others are in operation

- single-result-operations now run as *tasks* meaning that messages related
to them can be overlapped with other messages on the websocket.

- single-result-operations can be cancelled with the `complete` message.

- IDs for single result and streaming result operations are now released
once the operation is done, allowing them to be re-used later, as well as
freeing up resources related to previous requests.

Contributed by [Kristján Valur Jónsson](https://github.com/kristjanvalur) via [PR #1792](https://github.com/strawberry-graphql/strawberry/pull/1792/)

0.106.0

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

This release adds an implementation of the `GraphQLTestClient` for the `aiohttp` integration (in addition to the existing `asgi` and `Django` support). It hides the HTTP request's details and verifies that there are no errors in the response (this behavior can be disabled by passing `asserts_errors=False`). This makes it easier to test queries and makes your tests cleaner.

If you are using `pytest` you can add a fixture in `conftest.py`

python
import pytest

from strawberry.aiohttp.test.client import GraphQLTestClient


pytest.fixture
def graphql_client(aiohttp_client, myapp):
yield GraphQLTestClient(aiohttp_client(myapp))


And use it everywhere in your tests

python
def test_strawberry(graphql_client):
query = """
query Hi($name: String!) {
hi(name: $name)
}
"""

result = graphql_client.query(query, variables={"name": "🍓"})

assert result.data == {"hi": "Hi 🍓!"}


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

0.105.1

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

This release fixes a bug in the codegen that marked optional unions
as non optional.

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

0.105.0

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

This release adds support for passing `json_encoder` and `json_dumps_params` to Sanic's view.


python
from strawberry.sanic.views import GraphQLView

from api.schema import Schema

app = Sanic(__name__)

app.add_route(
GraphQLView.as_view(
schema=schema,
graphiql=True,
json_encoder=CustomEncoder,
json_dumps_params={},
),
"/graphql",
)


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

0.104.4

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

Allow use of `AsyncIterator` and `AsyncIterable` generics to annotate return
type of subscription resolvers.

Contributed by [San Kilkis](https://github.com/skilkis) via [PR #1771](https://github.com/strawberry-graphql/strawberry/pull/1771/)

Page 56 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.