Skip to content

feat: support federation 2.7 #2088

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 29, 2025
Merged

feat: support federation 2.7 #2088

merged 10 commits into from
Apr 29, 2025

Conversation

Samjin
Copy link
Contributor

@Samjin Samjin commented Apr 14, 2025

Support federation v2.7. Here's directive details
Support progressive @override directive.

These directives will require specific federation versions to generate schema.

  1. @authenticate directive is generated from 2.5+
  2. @requiresScopes directive is generated from 2.5+
  3. @policy directive is generated from 2.6+
  4. @composeDirective directive is generated from 2.1+
  5. @interfaceObject directive is generated from 2.3+
  6. @override directive with 2nd argument of label from 2.7

@dariuszkuc
Copy link
Collaborator

Currently this lib allows you specify you own custom @link federation spec import -> this change does not account for this and will update directive definitions even if folks specifically target older versions of federation

@Samjin Samjin marked this pull request as draft April 14, 2025 18:11
@Samjin
Copy link
Contributor Author

Samjin commented Apr 14, 2025

Currently this lib allows you specify you own custom @link federation spec import -> this change does not account for this and will update directive definitions even if folks specifically target older versions of federation

Had a brief discussion, the plan is to check if progressive override label would work with older fed version from composition. if not, we'll have to check fed version per directives to make sure they are correctly generated.

@Samjin
Copy link
Contributor Author

Samjin commented Apr 19, 2025

Somehow fed 2.7.5 with Router 1.47.0 failed,
but 2.7.2 with v1.45.1 worked for composition check.
https://www.apollographql.com/docs/graphos/routing/federation-version-support

@Samjin Samjin marked this pull request as ready for review April 19, 2025 00:05
@Samjin Samjin requested review from dariuszkuc and samuelAndalon and removed request for dariuszkuc April 21, 2025 23:34
@Samjin
Copy link
Contributor Author

Samjin commented Apr 23, 2025

Somehow fed 2.7.5 with Router 1.47.0 failed, but 2.7.2 with v1.45.1 worked for composition check. https://www.apollographql.com/docs/graphos/routing/federation-version-support

Confirmed with Apollo it is a Rover bug and fixed with federation =2.7.8

@Samjin Samjin changed the title Add label as optional arg to @override directive feat: add label as optional arg to @override directive Apr 29, 2025
@samuelAndalon samuelAndalon merged commit 7b9676c into ExpediaGroup:master Apr 29, 2025
11 checks passed
@Samjin Samjin changed the title feat: add label as optional arg to @override directive feat: support federation 2.7 Apr 29, 2025
Samjin added a commit to Samjin/graphql-kotlin that referenced this pull request Apr 29, 2025
…2088)

Support federation v2.7. Here's [directive
details](https://www.apollographql.com/docs/graphos/schema-design/federated-schemas/reference/directives)
Support [progressive @OverRide
directive](https://www.apollographql.com/docs/graphos/schema-design/federated-schemas/reference/directives#progressive-override).

These directives will require specific federation versions to generate
schema.

1. `@authenticate` directive is generated from `2.5+` 
2. `@requiresScopes` directive is generated from `2.5+` 
3. `@policy` directive is generated from `2.6+` 
4. `@composeDirective` directive is generated from `2.1+` 
5. `@interfaceObject ` directive is generated from `2.6+` 
6. `@override` directive with 2nd argument of `label` from `2.7`

---------

Co-authored-by: sjin <sjin@expediagroup.com>
Samjin added a commit that referenced this pull request Apr 29, 2025
cherry pick #2088 to
8.x.x

Co-authored-by: sjin <sjin@expediagroup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants