We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0888c74 commit eb7a026Copy full SHA for eb7a026
1 file changed
docs/mutations.rst
@@ -36,7 +36,8 @@ Simple example
36
# The class attributes define the response of the mutation
37
question = graphene.Field(QuestionType)
38
39
- def mutate(self, info, text, id):
+ @classmethod
40
+ def mutate(cls, root, info, text, id):
41
question = Question.objects.get(pk=id)
42
question.text = text
43
question.save()
0 commit comments