-
Notifications
You must be signed in to change notification settings - Fork 399
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
resolveReference
no longer called correctly in latest @apollo/subgraph
version
#2228
Comments
Thanks for opening it here. But it's once you install subgraph 0.4.2, it stops resolving across the services. I tried with this example - https://github.com/nestjs/nest/tree/master/sample/31-graphql-federation-code-first - and it still didn't work. But once I changed the version to 0.4.0, it worked again. |
@NeutronScott12 Did you mean subgraph 2.0? 4.0/4.2 doesn't appear to be a valid version |
0.4.2(forgot to add the 0), Nest doesn't work for version 2 of anything of Apollo yet. |
Would you like to create a PR to address this issue? |
-> #2245 |
Thank you @trevor-scheer! Let's track this here #2245 |
Is there an existing issue for this?
Current behavior
Nest appears to depend on some non-public API within the subgraph library by calling the
resolveReference
functions directly. The location of this function was moved onto theextensions
object in latest versions of the@apollo/subgraph
library, so the usage needs to be updated here.I'm not quite sure how users install dependencies and use the nest framework, so this may or may not be a breaking change for your library.
To see the change that was made: apollographql/federation#1747
(I'm going to fill out the rest of the required template bits with nonsense, I'm not going to provide a reproduction but maybe @NeutronScott12 can)
Other useful links:
apollographql/federation#1895
graphql/packages/graphql/lib/utils/transform-schema.util.ts
Lines 31 to 37 in 260ec9e
graphql/packages/graphql/lib/utils/transform-schema.util.ts
Line 85 in 260ec9e
And since I noticed it,
transformSchema
fromapollo-tooling
is no longer used (it lives in the federation repo now) so this comment should be updated:graphql/packages/graphql/lib/utils/transform-schema.util.ts
Lines 1 to 3 in 260ec9e
The text was updated successfully, but these errors were encountered: