Closed
Description
Is empty string considered an invalid value for Decimal scalar?
If so then how do we represent an empty value for a Decimal?
I've tried to fix this by parsing empty string to None
but that results in an error. The error happens in graphql.utils.is_valid_value
(see below).
"""
This part of the code from `graphql.utils.is_valid_value` returns errors
when None value is returned from Decimal scalar
"""
parse_result = type.parse_value(value)
if parse_result is None:
return [u'Expected type "{}", found {}.'.format(type, json.dumps(value))]
UPDATE:
I dug my head out of the sand and realised that using null
on the client is the obvious thing to do for clearing a value.
Metadata
Assignees
Labels
No labels
Activity