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

Fix 2546: Federation 2 Relax external for object #2599

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Conversation

StevenACoffman
Copy link
Collaborator

@StevenACoffman StevenACoffman commented Mar 29, 2023

Fixes #2546

@external was originally (Federation v1) only applicable on FIELD_DEFINITION.
Federation v2 relaxed directive definition to also allow applying it on OBJECT (which has the same effect as making all the object fields as @external).

The specs for v2 indicate that it is allowed on objects: https://www.apollographql.com/docs/federation/subgraph-spec/. directive @external on FIELD_DEFINITION | OBJECT A dig through the source of gqlgen resulted in this:

directive @external on FIELD_DEFINITION

Signed-off-by: Steve Coffman steve@khanacademy.org

Signed-off-by: Steve Coffman <steve@khanacademy.org>
@StevenACoffman StevenACoffman changed the title Fix 2546: Relax external for object Fix 2546: Federation 2 Relax external for object Mar 29, 2023
@StevenACoffman StevenACoffman added the federation Related to Apollo federation label Mar 29, 2023
@coveralls
Copy link

Coverage Status

Coverage: 75.215% (-0.05%) from 75.264% when pulling bf14092 on fix_2546 into db53479 on master.

@StevenACoffman StevenACoffman merged commit 9a644c5 into master Mar 29, 2023
@StevenACoffman StevenACoffman deleted the fix_2546 branch March 29, 2023 15:09
StevenACoffman added a commit that referenced this pull request Mar 30, 2023
Signed-off-by: Steve Coffman <steve@khanacademy.org>
StevenACoffman added a commit that referenced this pull request Mar 30, 2023
Signed-off-by: Steve Coffman <steve@khanacademy.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
federation Related to Apollo federation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid Federation 2 specs defined
2 participants