File tree Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -217,13 +217,14 @@ type MyMutationRootType {
217217{"Subscription" } respectively .
218218
219219The type system definition language can omit the schema definition when each
220- _root operation type_ uses its respective _default root type name_ and no other
221- type uses any _default root type name_.
220+ _root operation type_ uses its respective _default root type name_, no other
221+ type uses any _default root type name_, and the schema does not have a
222+ description.
222223
223224Likewise, when representing a GraphQL schema using the type system definition
224225language, a schema definition should be omitted if each _root operation type_
225- uses its respective _default root type name_ and no other type uses any _default
226- root type name_.
226+ uses its respective _default root type name_, no other type uses any _default
227+ root type name_, and the schema does not have a description .
227228
228229This example describes a valid complete GraphQL schema, despite not explicitly
229230including a {`schema`} definition . The {"Query" } type is presumed to be the
@@ -259,6 +260,27 @@ type Mutation {
259260}
260261```
261262
263+ This example describes a valid GraphQL schema with a description and both a
264+ {`query`} and {`mutation `} operation type :
265+
266+ ```graphql example
267+ """
268+ Example schema
269+ """
270+ schema {
271+ query : Query
272+ mutation : Mutation
273+ }
274+
275+ type Query {
276+ someField : String
277+ }
278+
279+ type Mutation {
280+ someMutation : String
281+ }
282+ ```
283+
262284### Schema Extension
263285
264286SchemaExtension :
You can’t perform that action at this time.
0 commit comments