Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added directives for apollo federation 2.6 * lint * lint * changed policies to policy to match spec * documentation and release fine * document what fed spec version is supported * sourcery-ai feedback * minor version * pr feedback * update federation-compatibility test version * Update settings for apollo federation tests * PR feedback: removed Federation__Policy and Federation__Scope to fix tests * added override lable to bring in line with fed spec 2.7 --------- Co-authored-by: Patrick Arminio <patrick.arminio@gmail.com>
- Loading branch information
Showing
23 changed files
with
766 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Release type: minor | ||
|
||
This release adds support for Apollo Federation v2.7 which includes the `@authenticated`, `@requiresScopes`, `@policy` directives, as well as the `label` argument for `@override`. | ||
As usual, we have first class support for them in the `strawberry.federation` namespace, here's an example: | ||
|
||
```python | ||
from strawberry.federation.schema_directives import Override | ||
|
||
|
||
@strawberry.federation.type( | ||
authenticated=True, | ||
policy=[["client", "poweruser"], ["admin"]], | ||
requires_scopes=[["client", "poweruser"], ["admin"]], | ||
) | ||
class Product: | ||
upc: str = strawberry.federation.field( | ||
override=Override(override_from="mySubGraph", label="percent(1)") | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.