mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-22 09:36:44 +03:00
Merge pull request #1381 from belkka/patch-1
Avoid ambiguity in graphene.Mutation docstring [documentation]
This commit is contained in:
commit
97abb9db42
|
@ -29,21 +29,21 @@ class Mutation(ObjectType):
|
|||
|
||||
.. code:: python
|
||||
|
||||
from graphene import Mutation, ObjectType, String, Boolean, Field
|
||||
import graphene
|
||||
|
||||
class CreatePerson(Mutation):
|
||||
class CreatePerson(graphene.Mutation):
|
||||
class Arguments:
|
||||
name = String()
|
||||
name = graphene.String()
|
||||
|
||||
ok = Boolean()
|
||||
person = Field(Person)
|
||||
ok = graphene.Boolean()
|
||||
person = graphene.Field(Person)
|
||||
|
||||
def mutate(parent, info, name):
|
||||
person = Person(name=name)
|
||||
ok = True
|
||||
return CreatePerson(person=person, ok=ok)
|
||||
|
||||
class Mutation(ObjectType):
|
||||
class Mutation(graphene.ObjectType):
|
||||
create_person = CreatePerson.Field()
|
||||
|
||||
Meta class options (optional):
|
||||
|
|
Loading…
Reference in New Issue
Block a user