File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -10,20 +10,20 @@ This example defines a Mutation:
10
10
11
11
.. code :: python
12
12
13
- import graphene
13
+ import graphene
14
14
15
- class CreatePerson(graphene.Mutation):
16
- class Input:
17
- name = graphene.String()
15
+ class CreatePerson (graphene .Mutation ):
16
+ class Input :
17
+ name = graphene.String()
18
18
19
- ok = graphene.Boolean()
20
- person = graphene.Field(lambda: Person)
19
+ ok = graphene.Boolean()
20
+ person = graphene.Field(lambda : Person)
21
21
22
- @staticmethod
23
- def mutate(root, args, context, info):
24
- person = Person(name=args.get('name'))
25
- ok = True
26
- return CreatePerson(person=person, ok=ok)
22
+ @ staticmethod
23
+ def mutate (root , args , context , info ):
24
+ person = Person(name = args.get(' name' ))
25
+ ok = True
26
+ return CreatePerson(person = person, ok = ok)
27
27
28
28
**person ** and **ok ** are the output fields of the Mutation when is
29
29
resolved.
You can’t perform that action at this time.
0 commit comments