Skip to content

Commit d034049

Browse files
committed
Add description to Schema
1 parent 0b91f96 commit d034049

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
@@ -218,7 +218,7 @@ TypeSystemExtension :
218218
- SchemaExtension
219219
- TypeExtension
220220

221-
SchemaDefinition : schema Directives[Const]? { RootOperationTypeDefinition+ }
221+
SchemaDefinition : Description? schema Directives[Const]? { RootOperationTypeDefinition+ }
222222

223223
SchemaExtension :
224224
- extend schema Directives[Const]? { RootOperationTypeDefinition+ }

spec/Section 3 -- Type System.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,23 @@ Markdown syntax (as specified by [CommonMark](https://commonmark.org/)). In the
5353
type system definition language, these description strings (often {BlockString})
5454
occur immediately before the definition they describe.
5555

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

6060
As an example, this simple GraphQL schema is well described:
6161

6262
```graphql example
6363
"""
6464
A simple GraphQL schema which is well described.
6565
"""
66+
schema {
67+
query: Query
68+
}
69+
70+
"""
71+
Root type for all your queries
72+
"""
6673
type Query {
6774
"""
6875
Translates a string from a given language into a different language.
@@ -97,7 +104,7 @@ enum Language {
97104

98105
## Schema
99106

100-
SchemaDefinition : schema Directives[Const]? { RootOperationTypeDefinition+ }
107+
SchemaDefinition : Description? schema Directives[Const]? { RootOperationTypeDefinition+ }
101108

102109
RootOperationTypeDefinition : OperationType : NamedType
103110

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)