You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So from what I can understand, the Gateway is not requesting the "friends" data from Subgraph 2.
Now if in Subgraph 2 I rename the type PageOfUser to PageOfFriends (a name that is different from that defined in Subgraph 1) then it works fine through the Gateway.
Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.
Given the following 2 graphql subgraphs:
Subgraph 1:
Subgraph 2:
Subgraph 2 has a resolver for
friends
which always returns some data.If I run the following query against the Gateway:
The response is:
And the friends resolver never triggers.
I can get the data for friends correctly if I manually query subgraph 2 directly like this:
So from what I can understand, the Gateway is not requesting the "friends" data from Subgraph 2.
Now if in Subgraph 2 I rename the type
PageOfUser
toPageOfFriends
(a name that is different from that defined in Subgraph 1) then it works fine through the Gateway.According to this https://www.apollographql.com/docs/federation/v1/value-types/, it is fine for the subgraphs to define the same types multiple times, as long as they are exactly identical.
Is this a bug or a misuse of federation?
Sample to reproduce:
https://github.com/abc-moviestarplanet/GatewayResolverIssue/tree/main
The text was updated successfully, but these errors were encountered: