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

feat: use apollo-rs to auto-use Federation 2 #1090

Closed
EverlastingBugstopper opened this issue Apr 13, 2022 · 3 comments · Fixed by #1097 or #1106
Closed

feat: use apollo-rs to auto-use Federation 2 #1090

EverlastingBugstopper opened this issue Apr 13, 2022 · 3 comments · Fixed by #1097 or #1106
Assignees
Milestone

Comments

@EverlastingBugstopper
Copy link
Contributor

when any subgraph contains an @link directive, rover should just use federation 2 composition under the hood.

right now the only way to use federation 2 is to set federation_version: 2 in supergraph.yaml

this means if you pass a bunch of subgraphs with @link directives, rover supergraph compose will use federation 1 composition by default. we should instead detect the existence of an @link directive, and use SupergraphConfig::set_federation_version to FederationVersion::LatestFedTwo here.

@lrlna has kindly promised to pair with me on this next week - apollo-rs should be a big help here.

@EverlastingBugstopper
Copy link
Contributor Author

for more context see #1089

@prasek
Copy link

prasek commented Apr 13, 2022

@EverlastingBugstopper awesome this is great.

will it work like this?

  • if federation_version included in supergraph.yaml then always use that version for composition
  • if federation_version omitted in supergraph.yaml, then auto-detect federation_version, looking for @link fed2

@EverlastingBugstopper
Copy link
Contributor Author

yup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants