Skip to content

Commit eb7a026

Browse files
authored
Use explicit classmethod in simple mutation example (#1059)
rel #1038
1 parent 0888c74 commit eb7a026

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/mutations.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ Simple example
3636
# The class attributes define the response of the mutation
3737
question = graphene.Field(QuestionType)
3838
39-
def mutate(self, info, text, id):
39+
@classmethod
40+
def mutate(cls, root, info, text, id):
4041
question = Question.objects.get(pk=id)
4142
question.text = text
4243
question.save()

0 commit comments

Comments
 (0)