Skip to content

__typename always returned in type even if field not present in query #181

Answered by kitten
lmatteis asked this question in Q&A
Discussion options

You must be logged in to vote

There's one where case where we now explicitly add it as an optinal property like in your example. It's basically in interface/union cases, to prevent types not correctly collapsing when a __typename field hasn't been selected explicitly.

More info here: #102

It's marked as optional though to prevent you from accidentally assuming it'll actually be present.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lmatteis
Comment options

Answer selected by lmatteis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants