Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support Apollo Federation 2.5 #1839

Merged
merged 2 commits into from Sep 12, 2023

Conversation

dariuszkuc
Copy link
Collaborator

馃摑 Description

Adds support for Apollo Federation v2.5.

Adds new willApplyDirective/didApplyDirective hooks that can be used to customize transformation of directive definition to applied directive. JVM does not support nested arrays as annotation arguments so we need to apply custom hooks to generate valid @requiresScopes directive. New hooks can also be used to filter out default arguments (#1830).

New federation directives

  • @authenticated - indicates that target element is only accessible to the authenticated supergraph users
  • @requiresScopes - indicates that target element is only accessible to the authenticated supergraph users with the appropriate JWT scopes

Note: due to the potential conflict on directive names we will no longer auto import federation directives. New directives will be auto-namespaced to the target spec. For backwards compatibility, we will continue auto-importing directives up to Federation version 2.3.

馃敆 Related Issues

#1830

Adds support for [Apollo Federation v2.5](https://www.apollographql.com/docs/federation/federation-versions#v25).

Adds new `willApplyDirective`/`didApplyDirective` hooks that can be used to customize transformation of directive definition to applied directive. JVM does not support nested arrays as annotation arguments so we need to apply custom hooks to generate valid `@requiresScopes` directive. New hooks can also be used to filter out default arguments (ExpediaGroup#1830).

New federation directives

- `@authenticated` - indicates that target element is only accessible to the authenticated supergraph users
- `@requiresScopes` - indicates that target element is only accessible to the authenticated supergraph users with the appropriate JWT scopes

Note: due to the potential conflict on directive names we will no longer auto import federation directives. New directives will be auto-namespaced to the target spec. For backwards compatibility, we will continue auto-importing directives up to Federation version 2.3.
@dariuszkuc dariuszkuc added changes: minor Changes require a minor version module: generator Issue affects the schema generator and federation code labels Sep 11, 2023
@dariuszkuc dariuszkuc added status: do not merge Do not merge until this is removed and removed status: do not merge Do not merge until this is removed labels Sep 12, 2023
@samuelAndalon samuelAndalon merged commit b173ea0 into ExpediaGroup:master Sep 12, 2023
11 checks passed
@dariuszkuc dariuszkuc deleted the fed25 branch September 18, 2023 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: minor Changes require a minor version module: generator Issue affects the schema generator and federation code
Development

Successfully merging this pull request may close these issues.

None yet

2 participants