fix(deps) Upgrade apollo federation with subgraph#1797
fix(deps) Upgrade apollo federation with subgraph#1797kamilmysliwiec merged 4 commits intonestjs:masterfrom iMobs:upgrade-apollo-federation-with-subgraph
Conversation
|
Looking again at where @apollo/federation is used, it could be replaced entirely with @apollo/subgraph since the only thing still in use is buildFederatedSchema which is deprecated and a re-export of buildSubgraphSchema. This seems like a more drastic step so I'll wait for initial feedback. |
Recently the subgraph package was split off from the main federation package. This moved the federation directives and renamed printSchema to printSubgraphSchema.
This is now part of the subgraph dependency.
This is now part of the subgraph dependency and renamed to printSubgraphSchema.
This is now part of the subgraph dependency and the type defs do not need to be duplicated.
Agree. Would you like to create a follow-up PR that entirely replaces the I'll merge this one shortly, thanks! |
|
@iMobs Just for reference this or follow-up PRs are not resolving #1780 case because in the place of "schema to file generation" ( |
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?
Issue Number: #1782
What is the new behavior?
Directives and printSchema (now renamed printSubgraphSchema) are imported from the @apollo/subgraph module instead of from @apollo/federation.
Does this PR introduce a breaking change?
Other information
Recently the @apollo/subgraph module was created and split off from the @apollo/federation module (PR) and released that as a patch update. This broke using @nestjs/graphql with the newest version of @apollo/federation. The most obvious problem was with the optional import of directives reported in #1782.
I believe this overlaps and resolves the same issue as #1780 since this fixes the federation use of printSchema without changing the normal use of printSchema.
Closes #1782