Skip to content

Commit 7455063

Browse files
authored
Fixed mutation docs (adding missing info arg in mutate)
1 parent 1d52148 commit 7455063

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

docs/types/mutations.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This example defines a Mutation:
1919
ok = graphene.Boolean()
2020
person = graphene.Field(lambda: Person)
2121
22-
def mutate(self, name):
22+
def mutate(self, info, name):
2323
person = Person(name=name)
2424
ok = True
2525
return CreatePerson(person=person, ok=ok)
@@ -104,10 +104,7 @@ To use an InputField you define an InputObjectType that specifies the structure
104104
person = graphene.Field(Person)
105105
106106
@staticmethod
107-
def mutate(root, person_data=None):
108-
name = p_data.get('name')
109-
age = p_data.get('age')
110-
107+
def mutate(root, info, person_data=None):
111108
person = Person(
112109
name=person_data.name,
113110
age=person_data.age

0 commit comments

Comments
 (0)