Issue Description
We are getting the following error when using queries that have a combination of non intersecting fragments and @include directive.
Error:
Cannot add fragment of condition "Video" (runtimes: [Show]) to parent type "Show" (runtimes: Show)
GraphQLError: Cannot add fragment of condition "Video" (runtimes: [Show]) to parent type "Show" (runtimes: Show)
at Object.err (/Users/antoineb/IdeaProjects/federation/internals-js/src/error.ts:36:60)
at validate (/Users/antoineb/IdeaProjects/federation/internals-js/src/operations.ts:61:34)
at FragmentElement.rebaseOn (/Users/antoineb/IdeaProjects/federation/internals-js/src/operations.ts:492:7)
at FragmentElement.rebaseOnOrError (/Users/antoineb/IdeaProjects/federation/internals-js/src/operations.ts:91:17)
at makeSelection (/Users/antoineb/IdeaProjects/federation/internals-js/src/operations.ts:2239:40)
(...)
Link to Reproduction
main...tinnou:federation:non_intersecting_fragment_with_include
Reproduction Steps
I added a unit test that reproduces the issue with a minimal schema and query in buildPlan.test.ts see the commit details.
If you remove @include the plan succeeds.
Issue Description
We are getting the following error when using queries that have a combination of non intersecting fragments and
@includedirective.Error:
Link to Reproduction
main...tinnou:federation:non_intersecting_fragment_with_include
Reproduction Steps
I added a unit test that reproduces the issue with a minimal schema and query in
buildPlan.test.tssee the commit details.If you remove
@includethe plan succeeds.