Strawberry-graphql

Latest version: v0.229.1

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

Scan your dependencies

Page 15 of 119

0.199.3

--------------------

This release fixes an issue on `relay.ListConnection` where async iterables that returns
non async iterable objects after being sliced where producing errors.

This should fix an issue with async strawberry-graphql-django when returning already
prefetched QuerySets.

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

0.199.2

--------------------

This releases improves how we handle Annotated and async types
(used in subscriptions). Previously we weren't able to use
unions with names inside subscriptions, now that's fixed 😊

Example:

python
strawberry.type
class A:
a: str


strawberry.type
class B:
b: str


strawberry.type
class Query:
x: str = "Hello"


strawberry.type
class Subscription:
strawberry.subscription
async def example_with_union(self) -> AsyncGenerator[Union[A, B], None]:
yield A(a="Hi")


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

0.199.1

--------------------

This release fixes an issue in the `graphql-ws` implementation
where sending a `null` payload would cause the connection
to be closed.

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

0.199.0

--------------------

This release changes how we handle generic type vars, bringing
support to the new generic syntax in Python 3.12 (which will be out in October).

This now works:

python
strawberry.type
class Edge[T]:
cursor: strawberry.ID
node_field: T


strawberry.type
class Query:
strawberry.field
def example(self) -> Edge[int]:
return Edge(cursor=strawberry.ID("1"), node_field=1)


schema = strawberry.Schema(query=Query)


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

0.198.0

--------------------

This release adds support for returning interfaces directly in resolvers:

python
strawberry.interface
class Node:
id: strawberry.ID

classmethod
def resolve_type(cls, obj: Any, *args: Any, **kwargs: Any) -> str:
return "Video" if obj.id == "1" else "Image"


strawberry.type
class Video(Node): ...


strawberry.type
class Image(Node): ...


strawberry.type
class Query:
strawberry.field
def node(self, id: strawberry.ID) -> Node:
return Node(id=id)


schema = strawberry.Schema(query=Query, types=[Video, Image])


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

0.197.0

--------------------

This release removes support for Python 3.7 as its end of life
was on 27 Jun 2023.

This will allow us to reduce the number of CI jobs we have,
and potentially use newer features of Python. âš¡

Contributed by [Alexander](https://github.com/devkral) via [PR #2907](https://github.com/strawberry-graphql/strawberry/pull/2907/)

Page 15 of 119

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.