Skip to content

Commit

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

0.198.0 - 2023-07-31
--------------------

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 - 2023-07-30
--------------------

Expand Down
33 changes: 0 additions & 33 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.197.0"
version = "0.198.0"
description = "A library for creating GraphQL APIs"
authors = ["Patrick Arminio <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit fce75cc

Please sign in to comment.