Open Cito opened 3 years ago
I guess schema validation should throw an error.
GraphQL services must return one of the defined set of possible values. If a reasonable coercion is not possible they must raise a field error GraphQL enum result
In this case role doesn’t choose from one of the possible defined types in the set which means it should raise an error.
CC: @IvanGoncharov
Keeping this open despite #3814 because it would be nice if this could be validated within the SDL.
Recently the issue was raised for the Python port graphql-core that enum values aren't validated against their defintion when they are used as default arguments SDL. This is the example that was given:
Should schema validation not show this is an error?