validate field merging when multiple sub-selections partially overlap #819
Labels
apollo-compiler
issues/PRs pertaining to semantic analysis & validation
Milestone
copying from #816:
Current situation
This is an offending query:
Here, assume B.overlapping selects an Int!, and C.overlapping selects an Int. Clearly root.overlapping can either be Int! or Int, and so this must be an error. But previous versions of apollo-compiler do not report anything.
Cause
The validation is implemented by drilling in from the top down. The first field it encounters is root. root is selected multiple times so we need to see if its subselections can merge. In main, we do this by comparing every subselection to the first subselection (... on A { unrelated }). Both the B and C subselections can be merged with A, as they don't select any conflicting fields.
The text was updated successfully, but these errors were encountered: