Why is __typename possibly undefined? #9554
-
|
Suppose I have a Query function that either returns On the client side I check whether the response was The problem I have here is, that codegen generates all my types with an optional Why exactly does codegen generate and not ? Thank you in advance! Edit 1: Not sure if it's important, but my resolvers always return in the form of so clearly Edit 2: Tried this option but it has no effect. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
God damn I feel so f dumb. Added (Also found the relevant issues (link, link) covering my issue.) |
Beta Was this translation helpful? Give feedback.
God damn I feel so f dumb. Added
nonOptionalTypename: true,to the resolvers config.. (wrong place) Now it's working.(Also found the relevant issues (link, link) covering my issue.)