Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
fix(sample): update gql federation samples to use production-ready#15539
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
fix(sample): update gql federation samples to use production-ready#15539
Uh oh!
There was an error while loading.Please reload this page.
Conversation
mag123c commentedAug 18, 2025
coverage collected failed 😨😨 |
dberardo-com commentedAug 18, 2025
Two questions here: Is the usage of rover CLI mandatory for generating super graph or is it just an alternative to the first generation method? This is not 100% from the text IMO What would happen if one of the backend applications does not startup? Will the gateway keep crashing or will it simply return 500 for those methods requiring those services? Is the behavior the same even after startup? |
mag123c commentedAug 19, 2025
Q1.No, Rover CLI is NOT mandatory. The implementation provides two methods:
As shown in the code // generate-supergraph.ts:108-114constuseRover=process.argv.includes('--rover');if(useRover){generateSupergraph();// Uses Rover}else{generateSupergraphLocal();// Local generation (no Rover needed)} The README clearly states these are alternatives, with Rover being the production-recommended approach but not mandatory. Q2.Current implementation (static supergraphSdl)
IntrospectAndCompose behavior (commented out)
|
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The GraphQL Federation sample applications (both code-first and schema-first) use IntrospectAndCompose from @apollo/gateway, which is not production-ready. This approach:
Issue Number:#14676
What is the new behavior?
The updated samples now demonstrate production-ready patterns:
- generate:supergraph: Local development using file-based composition
- generate:supergraph:rover: Production using Apollo Rover CLI
The samples now provide a clear migration path from development to production, following Apollo Federation best practices.
Does this PR introduce a breaking change?