#Help with union(enum) Tag Type Mismatch in switch Statement
1 messages · Page 1 of 1 (latest)
Also, generally union field names should be snake_case
so maybe just like operation instead of OperationDefinitionNode
(you can do the same thing for grammar.DefinitionNode.ExecutableDefinitionNode, that can just be .ExecutableDefinitionNode)
No, it's equivalent to grammar.ExecutableDefinitionNode.OperationDefinitionNode
but just using the inferred type is almost always better
The error you're getting is because you're referring to the type OperationDefinitionNode, not the field named that on the type ExecutableDefinitionNode (which is another reason it's a good idea to not name your fields the same thing as your types; avoids confusions like this ^^')