Skip to content

Commit 9ef2bc4

Browse files
committed
Add description to Schema
1 parent be9d5c6 commit 9ef2bc4

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

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](http://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)