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 34 of 122

0.163.2

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

This release covers an edge case where the following would not give a nice error.
python
some_field: "Union[list[str], SomeType]]"

Fixes [2591](https://github.com/strawberry-graphql/strawberry/issues/2591)

Contributed by [ניר](https://github.com/nrbnlulu) via [PR #2593](https://github.com/strawberry-graphql/strawberry/pull/2593/)

0.163.1

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

Provide close reason to ASGI websocket as specified by ASGI 2.3

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

0.163.0

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

This release adds support for list arguments in operation directives.

The following is now supported:

python
strawberry.directive(locations=[DirectiveLocation.FIELD])
def append_names(
value: DirectiveValue[str], names: List[str]
): note the usage of List here
return f"{value} {', '.join(names)}"


Contributed by [chenyijian](https://github.com/hot123s) via [PR #2632](https://github.com/strawberry-graphql/strawberry/pull/2632/)

0.162.0

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

Adds support for a custom field using the approach specified in issue [2168](abc).
Field Extensions may be used to change the way how fields work and what they return.
Use cases might include pagination, permissions or other behavior modifications.

python
from strawberry.extensions import FieldExtension


class UpperCaseExtension(FieldExtension):
async def resolve_async(
self,
next: Callable[..., Awaitable[Any]],
source: Any,
info: strawberry.Info,
**kwargs
):
result = await next(source, info, **kwargs)
return str(result).upper()


strawberry.type
class Query:
strawberry.field(extensions=[UpperCaseExtension()])
async def string(self) -> str:
return "This is a test!!"


graphql
query {
string
}


json
{
"string": "THIS IS A TEST!!"
}


Contributed by [Erik Wrede](https://github.com/erikwrede) via [PR #2567](https://github.com/strawberry-graphql/strawberry/pull/2567/)

0.161.1

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

Ensure that no other messages follow a "complete" or "error" message
for an operation in the graphql-transport-ws protocol.

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

0.161.0

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

Calling `ChannelsConsumer.channel_listen` multiple times will now pass
along the messages being listened for to multiple callers, rather than
only one of the callers, which was the old behaviour.

This resolves an issue where creating multiple GraphQL subscriptions
using a single websocket connection could result in only one of those
subscriptions (in a non-deterministic order) being triggered if they
are listening for channel layer messages of the same type.

Contributed by [James Thorniley](https://github.com/jthorniley) via [PR #2525](https://github.com/strawberry-graphql/strawberry/pull/2525/)

Page 34 of 122

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.