Open maraisr opened 4 years ago
@maraisr i think you can solve it using separate fragments for each union inside your querry. It will spilit it to fragmentRefs..
query BlogPostQuery {
blog {
__typename // Use this to differ
... PostNotFound_fragment
... Post_fragment
}
}
fragment PostNotFound_fragment on PostNotFound {
...
}
fragment Post_fragment on Post {
...
}
for the definition:
and the query:
Error:
The types generated doesn't allow me to discriminate unions:
To me that is wrong, because the typename
PostNotFound
doesnt have those fields on it.Expected:
or would I need to ask for
__typename
on every union member, or on field for that matter.Logging so I don't forget, will raise a fix PR soon