Skip to content

Commit

Permalink
Add description to Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jun 13, 2018
1 parent bd5cdd8 commit 7321fc2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,23 @@ Markdown syntax (as specified by [CommonMark](http://commonmark.org/)). In the
type system definition language, these description strings (often {BlockString})
occur immediately before the definition they describe.

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

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

```graphql example
"""
A simple GraphQL schema which is well described.
"""
schema {
query: Query
}

"""
Root type for all your queries
"""
type Query {
"""
Translates a string from a given language into a different language.
Expand Down Expand Up @@ -97,7 +104,7 @@ enum Language {

## Schema

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

RootOperationTypeDefinition : OperationType : NamedType

Expand Down
1 change: 1 addition & 0 deletions spec/Section 4 -- Introspection.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ The schema of the GraphQL schema introspection system:

```graphql
type __Schema {
description: string
types: [__Type!]!
queryType: __Type!
mutationType: __Type
Expand Down

0 comments on commit 7321fc2

Please sign in to comment.