Closed
Description
I've been searching for the underlying cause of the error in graphene-django that breaks Django choice fields when the value is blank: graphql-python/graphene-django#474 . This is a regression, new since graphql-core 2.1.
The validation for an enum value new in version 2.1 doesn't seem to take into account whether or not the field is allowed to have a null value before raising an exception.
if serialized_result is None:
raise GraphQLError(
('Expected a value of type "{}" but ' + "received: {}").format(
return_type, result
),
path=path,
)
Should this exception be the exception shouldn't be raised unconditionally? The graphql source has the same pattern in it but perhaps catches the error ... https://github.com/graphql/graphql-js/blob/master/src/execution/execute.js#L967
Metadata
Metadata
Assignees
Labels
No labels