-
Notifications
You must be signed in to change notification settings - Fork 769
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
When passing null as input in mutation, value does not show up in args #103
Comments
Keen to know this too |
This is a bug in the |
@syrusakbary I think you are referring to graphql-python/graphene#280 ? |
@imsickofmaps yes :) |
Seems like the same thing happens with variables as well. As @prokofiev mentioned here: |
Solved in 2.0 |
@BossGrand I don't get it. :| |
@Eraldo if you pass null from the client the argument will be Example: class SomeMutation(graphene.Mutation):
class Arguments:
name = graphene.String()
ok = graphene.Boolean()
def mutate(self, info, **args):
# If no name provided then `args = {}`
# If name is `null` then `args = { 'name': None }` |
@jkimbo So the correct way to define Also, it seems that the only way how I can set argument |
Hi there! I'm using When I send Thanks in advance! |
For example the following will raise an exception when number is null
On the JS side my getVariables input is:
I would expect calling args['number'] to return None instead of raising an exception if I specifically supply null as my input
Is this the desired behavior, or is this a bug?
The text was updated successfully, but these errors were encountered: