Mutation update how pass null value #1184
-
| model 
 
 
 | 
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
| 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: class UpdateModel(graphene.Mutation):
    class Arguments:
        id = graphene.ID()
        date = graphene.Date(required=False)
    @staticmethod
    def mutate(root, info, id, date=None):
        # handle empty dateLet me know if that answers your question and works for you. | 
Beta Was this translation helpful? Give feedback.
-
| Sadly this does not work for me using 2.0.1. :| I keep getting  | 
Beta Was this translation helpful? Give feedback.
-
| @Eraldo can you share a relevant code snippet? | 
Beta Was this translation helpful? Give feedback.
-
| Closing this down due to inactivity. | 
Beta Was this translation helpful? Give feedback.
-
| 
 This worked for me | 
Beta Was this translation helpful? Give feedback.
@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.