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

Already on GitHub? Sign in to your account

federation: add support for Apollo Federation subgraph spec v2.3 #1661

Merged
merged 9 commits into from
Feb 16, 2023

Conversation

dariuszkuc
Copy link
Collaborator

📝 Description

Updates federation module to support Apollo Federation subgraph spec v2.3

Changes:

  • v2.2 - update @shareable definition to be repeatable to allow annotating both types and their extensions (NOTE: this functionality is not applicable to graphql-kotlin)
  • v2.3 - adds new @interfaceObject directive that allows you to extend interface entity functionality in subgraphs, i.e. by applying @interfaceObject directive on a type we provide meta information to the composition logic that this entity type is actually an interface in the supergraph. This allows us to extend interface functionality without knowing any of its implementing types.

🔗 Related Issues

@dariuszkuc dariuszkuc added type: enhancement New feature or request changes: minor Changes require a minor version labels Jan 27, 2023
@eg-oss-ci
Copy link
Collaborator

eg-oss-ci commented Jan 27, 2023

Apollo Federation Subgraph Compatibility Results

Federation 1 SupportFederation 2 Support
_service🟢
@key (single)🟢
@key (multi)🟢
@key (composite)🟢
repeatable @key🟢
@requires🟢
@provides🟢
federated tracing🟢
@link🟢
@shareable🟢
@tag🟢
@override🟢
@inaccessible🟢
@composeDirective🟢
@interfaceObject🟢

Learn more:

@dariuszkuc dariuszkuc added the status: do not merge Do not merge until this is removed label Jan 28, 2023
@dariuszkuc dariuszkuc marked this pull request as ready for review February 14, 2023 21:42
@dariuszkuc
Copy link
Collaborator Author

note: pr-check-federation.yaml workflow had a bug in it as it used pull_request_target event (so the GH PAT secret could be passed over and we get PR comments) but the invoked workflows were not checking out the correct code, i.e. federation tests were run against origin codebase vs actual PR.

I fixed the federation workflows in the PR but we won't get updated results (for @composeDirective/@interfaceObject) in this PR until workflows are fixed, i.e. merge #1671 and rebase

Updates `federation` module to support Apollo Federation subgraph spec v2.3

Changes:
* v2.2 - update `@shareable` definition to be repeatable to allow annotating both types and their extensions (NOTE: this functionality is not applicable to `graphql-kotlin`)
* v2.3 - adds new `@interfaceObject` directive that allows you to extend interface entity functionality in subgraphs, i.e. by applying `@interfaceObject` directive on a type we provide meta information to the composition logic that this entity type is actually an interface in the supergraph. This allows us to extend interface functionality without knowing any of its implementing types.
@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 Feb 15, 2023
@dariuszkuc dariuszkuc removed the status: do not merge Do not merge until this is removed label Feb 15, 2023
@dariuszkuc dariuszkuc added the module: generator Issue affects the schema generator and federation code label Feb 15, 2023
@samuelAndalon samuelAndalon merged commit 10e9d84 into ExpediaGroup:master Feb 16, 2023
@dariuszkuc dariuszkuc deleted the fed2.3 branch February 16, 2023 22:48
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 type: enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

3 participants