Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update requirement for Query type in mutation docs #1213

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions docs/types/mutations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ So, we can finish our schema like this:
class MyMutations(graphene.ObjectType):
create_person = CreatePerson.Field()

# We must define a query for our schema
class Query(graphene.ObjectType):
person = graphene.Field(Person)

schema = graphene.Schema(query=Query, mutation=MyMutations)
schema = graphene.Schema(mutation=MyMutations)

Executing the Mutation
----------------------
Expand Down
2 changes: 1 addition & 1 deletion graphene/types/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ class Schema:
questions about the types through introspection.

Args:
query (Type[ObjectType]): Root query *ObjectType*. Describes entry point for fields to *read*
query (Optional[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.
Expand Down