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 {
217
217
{"Subscription" } respectively .
218
218
219
219
The 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.
222
223
223
224
Likewise, when representing a GraphQL schema using the type system definition
224
225
language, 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 .
227
228
228
229
This example describes a valid complete GraphQL schema, despite not explicitly
229
230
including a {`schema`} definition . The {"Query" } type is presumed to be the
@@ -259,6 +260,27 @@ type Mutation {
259
260
}
260
261
```
261
262
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
+
262
284
### Schema Extension
263
285
264
286
SchemaExtension :
You can’t perform that action at this time.
0 commit comments