You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
ifparse_resultisNone:
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.
Activity
[-]Decimal scalar and empty values[/-][+]Empty value for Decimal scalar[/+]