diff --git a/docs/types/mutations.rst b/docs/types/mutations.rst index 543f39b4..f8c76f35 100644 --- a/docs/types/mutations.rst +++ b/docs/types/mutations.rst @@ -48,7 +48,11 @@ So, we can finish our schema like this: class MyMutations(graphene.ObjectType): create_person = CreatePerson.Field() - schema = graphene.Schema(mutation=MyMutations) + # We must define a query for our schema + class Query(graphene.ObjectType): + person = graphene.Field(Person) + + schema = graphene.Schema(query=Query, mutation=MyMutations) Executing the Mutation ---------------------- diff --git a/graphene/types/schema.py b/graphene/types/schema.py index 0b6e9dac..29ead4a7 100644 --- a/graphene/types/schema.py +++ b/graphene/types/schema.py @@ -381,7 +381,7 @@ class Schema: questions about the types through introspection. Args: - query (Optional[Type[ObjectType]]): Root query *ObjectType*. Describes entry point for fields to *read* + query (Type[ObjectType]): Root query *ObjectType*. Describes entry point for fields to *read* data in your Schema. mutation (Optional[Type[ObjectType]]): Root mutation *ObjectType*. Describes entry point for fields to *create, update or delete* data in your API.