Skip to content

Commit 63307d9

Browse files
committed
Add description to Schema
1 parent c3dea48 commit 63307d9

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

spec/Appendix B -- Grammar Summary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ TypeSystemExtension :
194194
- SchemaExtension
195195
- TypeExtension
196196

197-
SchemaDefinition : schema Directives[Const]? { OperationTypeDefinition+ }
197+
SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
198198

199199
SchemaExtension :
200200
- extend schema Directives[Const]? { OperationTypeDefinition+ }

spec/Section 3 -- Type System.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ GraphQL service which is itself an extension of another GraphQL service.
4040

4141
## Schema
4242

43-
SchemaDefinition : schema Directives[Const]? { RootOperationTypeDefinition+ }
43+
SchemaDefinition : Description? schema Directives[Const]? { RootOperationTypeDefinition+ }
4444

4545
RootOperationTypeDefinition : OperationType : NamedType
4646

@@ -183,16 +183,23 @@ Markdown syntax (as specified by [CommonMark](http://commonmark.org/)). In the
183183
type system definition language, these description strings (often {BlockString})
184184
occur immediately before the definition they describe.
185185

186-
All GraphQL types, fields, arguments and other definitions which can be
187-
described should provide a {Description} unless they are considered self
188-
descriptive.
186+
GraphQL schema and all other definitions (e.g. types, fields, arguments, etc.)
187+
which can be described should provide a {Description} unless they are considered
188+
self descriptive.
189189

190190
As an example, this simple GraphQL schema is well described:
191191

192192
```graphql example
193193
"""
194194
A simple GraphQL schema which is well described.
195195
"""
196+
schema {
197+
query: Query
198+
}
199+
200+
"""
201+
Root type for all your queries
202+
"""
196203
type Query {
197204
"""
198205
Translates a string from a given language into a different language.

spec/Section 4 -- Introspection.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ The schema of the GraphQL schema introspection system:
117117

118118
```graphql
119119
type __Schema {
120+
description: String
120121
types: [__Type!]!
121122
queryType: __Type!
122123
mutationType: __Type

0 commit comments

Comments
 (0)