Abstract Spreads in Abstract Scope
Union or interfaces fragments can be used within each other. As long as there exists at least_one_object type that exists in the intersection of the possible types of the scope and the spread, the spread is considered valid.
So for example
fragment unionWithInterface on Pet {
...dogOrHumanFragment
}
fragment dogOrHumanFragment on DogOrHuman {
... on Dog {
barkVolume
}
}
is consider valid becauseDogimplements interfacePetand is a member ofDogOrHuman.
However
fragment nonIntersectingInterfaces on Pet {
...sentientFragment
}
fragment sentientFragment on Sentient {
name
}
is not valid because there exists no type that implements bothPetandSentient.