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
{{ message }}
Repository navigation
A union that's only a member of another union fails to build #866
typeQuery {
results: [Result!]!
}
unionResult = Book | MediaunionMedia = Movie
fails with
No object type found with name 'Media' for union: UnionTypeDefinition{name='Result'...}
SchemaParser#getLeafUnionObjects flattens nested unions, but SchemaClassScanner#getAllObjectTypeMembersOfDiscoveredUnions only skips member unions that are already in the dictionary, and Media isn't since no field returns it. It works once some field returns Media.
The spec only allows object types as union members, so nested unions are a tools-only thing. Not sure if it's worth fixing or if they should be rejected with a clearer error.
Activity