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
If one subgraph @requires a field to resolve another field, and that other field is @Shareable defined in multiple subgraphs, the query plan seems to arbitrarily pick one subgraph to resolve the shareable field everytime.
This results in a less performant query plan because even if the subgraph that is resolving the query can resolve the @Shareable field as well, the query plan still includes the third subgraph just to resolve the shareable field.
Included in the reproduction project I also use @provides to explicitly provide the required field and yet it is still not resolved from the expected subgraph.
I would expect that @Shareable would build the most efficient query plan automatically, but especially would expect it when explicitly defining the query plan by using @provides.
Issue Description
If one subgraph @requires a field to resolve another field, and that other field is @Shareable defined in multiple subgraphs, the query plan seems to arbitrarily pick one subgraph to resolve the shareable field everytime.
This results in a less performant query plan because even if the subgraph that is resolving the query can resolve the @Shareable field as well, the query plan still includes the third subgraph just to resolve the shareable field.
Included in the reproduction project I also use @provides to explicitly provide the required field and yet it is still not resolved from the expected subgraph.
I would expect that @Shareable would build the most efficient query plan automatically, but especially would expect it when explicitly defining the query plan by using
@provides
.Link to Reproduction
https://github.com/joshfoeh-bill/apollo-query-plan
Reproduction Steps
Reproduction steps included in readme of attached repo.
The text was updated successfully, but these errors were encountered: