def mutate(self, info, user_data): user = UserModel.objects(pk=user_data.user_id).get() user.firstname = user_data.firstname user.lastname = user_data.lastname user.save() return UpdateUser(user=user)
def mutate(self, info, user_data): user = UserModel.objects(pk=user_data.user_id).get() user.delete() return DeleteUser(user=user)
def resolve_user(self, info, userid=None): return UserModel.objects(pk=userid).get()