Skip to content

Commit

Permalink
Release 🍓 0.61.3
Browse files Browse the repository at this point in the history
  • Loading branch information
botberry committed May 13, 2021
1 parent a96a296 commit 4fc9c9b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
CHANGELOG
=========

0.61.3 - 2021-05-13
-------------------

Fix `@requires(fields: ["email"])` and `@provides(fields: ["name"])` usage on a Federation field

You can use `@requires` to specify which fields you need to resolve a field

```python
import strawberry

@strawberry.federation.type(keys=["id"], extend=True)
class Product:
id: strawberry.ID = strawberry.federation.field(external=True)
code: str = strawberry.federation.field(external=True)

@classmethod
def resolve_reference(cls, id: strawberry.ID, code: str):
return cls(id=id, code=code)

@strawberry.federation.field(requires=["code"])
def my_code(self) -> str:
return self.code
```

`@provides` can be used to specify what fields are going to be resolved
by the service itself without having the Gateway to contact the external service
to resolve them.

0.61.2 - 2021-05-08
-------------------

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

0 comments on commit 4fc9c9b

Please sign in to comment.