-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing JSONString with value "null" as mutation input leads to an error. #224
Comments
@sergey-komissarov this doesn't look like a bug because you're trying to pass the string |
I can not agree with you, |
@sergey-komissarov my apologies you're absolutely right. It looks like the bug is here: https://github.com/graphql-python/graphql-core/blob/fa4eeda36029680205e20059379e89189b946032/graphql/utils/is_valid_value.py#L77-L79 Because Unfortunately I can't see an easy fix. You might want to try https://github.com/graphql-python/graphql-core-next which is a more recent port of the graphql-js reference library and so probably doesn't suffer from the same bug. I don't think it's compatible with Graphene yet but you can still use it on its own. Also @Cito is a much more responsive maintainer 🙂 |
I don't understand why it can't be fixed? 🤔 |
I'd like to see that bug fixed too 🥲 |
Hello,
graphql-core
2.1 is unable to parse such values as argument.Result:
Argument "value" has invalid value "null". Expected type "JSONString", found "null".
Seems that
None
value is invalid regardless of the argument type. Of course we can handle it by passingnull
via query argument but I still think this is a bug.Exception stack trace:
Simple way to reproduce:
Query example:
GraphQL schema:
Graphene code:
The text was updated successfully, but these errors were encountered: