Mutation update how pass null value
See original GitHub issuemodel
date = models.DateField(blank=True, null=True)
schema
date = graphene.types.datetime.Date()
mutation ($var1: Date){ updateModel( id: 1, date: $var1 ) { model { id date } } }
{"var1": null}
{ "errors": [ { "message": "mutate() missing 1 required positional argument: 'date'", "locations": [ { "line": 2, "column": 3 } ] } ], "data": { "updateModel": null } }
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Mutation update how pass null value #1184 - GitHub
Sadly this does not work for me using 2.0.1. :| I keep getting None when passing null in my client. (vs undefined )....
Read more >GraphQL mutation returning null on update - Stack Overflow
I am using Amazon's Amplify library for GraphQL. Create mutations are returning non-null data in the response, but update mutations return null ......
Read more >Null input for graphql mutation - MongoDB
Hello! I am trying to create a React form component to update documents via GraphQL. I would like the form to be able...
Read more >Using nullability in GraphQL
A field can either be nullable or non-null, and this tells you whether or not you could receive a null value when you...
Read more >GraphQL Nullability - Episode #42
The GraphQL type system has built-in support for null, ... Now let's see what happens if we update the createUser mutation to return...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@juliocebrito
I haven’t tried this myself recently on the latest graphene/graphene-django versions. But based on these docs for graphene, I believe you should be able to do the following:
Let me know if that answers your question and works for you.
This worked for me Thanks!