Skip to content

Commit

Permalink
Release 🍓 0.196.0
Browse files Browse the repository at this point in the history
  • Loading branch information
botberry committed Jul 26, 2023
1 parent 4fcfb52 commit 1d52f35
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 29 deletions.
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
CHANGELOG
=========

0.196.0 - 2023-07-26
--------------------

This release adds support for union with a single member, they are
useful for future proofing your schema in cases you know a field
will be part of a union in future.

```python
import strawberry

from typing import Annotated


@strawberry.type
class Audio:
duration: int


@strawberry.type
class Query:
# note: Python's Union type doesn't support single members,
# Union[Audio] is exactly the same as Audio, so we use
# use Annotated and strawberry.union to tell Strawberry this is
# a union with a single member
latest_media: Annotated[Audio, strawberry.union("MediaItem")]


schema = strawberry.Schema(query=Query)
```

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


0.195.3 - 2023-07-22
--------------------

Expand Down
28 changes: 0 additions & 28 deletions RELEASE.md

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "strawberry-graphql"
packages = [ { include = "strawberry" } ]
version = "0.195.3"
version = "0.196.0"
description = "A library for creating GraphQL APIs"
authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
license = "MIT"
Expand Down

0 comments on commit 1d52f35

Please sign in to comment.