Skip to content
Merged
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
30 changes: 26 additions & 4 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,14 @@ type MyMutationRootType {
{"Subscription"} respectively.

The type system definition language can omit the schema definition when each
_root operation type_ uses its respective _default root type name_ and no other
type uses any _default root type name_.
_root operation type_ uses its respective _default root type name_, no other
type uses any _default root type name_, and the schema does not have a
description.

Likewise, when representing a GraphQL schema using the type system definition
language, a schema definition should be omitted if each _root operation type_
uses its respective _default root type name_ and no other type uses any _default
root type name_.
uses its respective _default root type name_, no other type uses any _default
root type name_, and the schema does not have a description.

This example describes a valid complete GraphQL schema, despite not explicitly
including a {`schema`} definition. The {"Query"} type is presumed to be the
Expand Down Expand Up @@ -259,6 +260,27 @@ type Mutation {
}
```

This example describes a valid GraphQL schema with a description and both a
{`query`} and {`mutation`} operation type:

```graphql example
"""
Example schema
"""
schema {
query: Query
mutation: Mutation
}

type Query {
someField: String
}

type Mutation {
someMutation: String
}
```

### Schema Extension

SchemaExtension :
Expand Down