PedroBern / django-graphql-auth

Django registration and authentication with GraphQL.
https://django-graphql-auth.readthedocs.io/en/latest/
MIT License
329 stars 106 forks source link

User partial update? #69

Open bloodwithmilk25 opened 4 years ago

bloodwithmilk25 commented 4 years ago

Is there a good way to partially update the user? I have my UPDATE_MUTATION_FIELDS defined like this

'UPDATE_MUTATION_FIELDS': ['email', 'username', 'nickname', 'profile_pic',
                                'first_name', 'last_name', 'date_of_birth'],

I want the client to able to update those fields one by one. But when I ran such query:

mutation {
    updateAccount(username: "foo-bar"){
      errors
      success
    }
  }

Only the username field gets a value, all the other fields are set to empty string or None. What is a good way to achieve it?