Skip to content

Commit 014bff8

Browse files
committed
keep current spec unchanged. Appendix C is purely additive
1 parent 6b14c89 commit 014bff8

File tree

2 files changed

+104
-11
lines changed

2 files changed

+104
-11
lines changed

spec/Section 3 -- Type System.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,10 +388,9 @@ Scalar types represent primitive leaf values in a GraphQL type system. GraphQL
388388
responses take the form of a hierarchical tree; the leaves of this tree are
389389
typically GraphQL Scalar types (but may also be Enum types or {null} values).
390390

391-
GraphQL provides a number of
392-
[built-in scalars](#sec-Appendix-Built-in-Definitions.Scalars) which are fully
393-
defined in the sections below, however type systems may also add additional
394-
custom scalars to introduce additional semantic meaning.
391+
GraphQL provides a number of built-in scalars which are fully defined in the
392+
sections below, however type systems may also add additional custom scalars to
393+
introduce additional semantic meaning.
395394

396395
**Built-in Scalars**
397396

@@ -1951,12 +1950,10 @@ GraphQL implementations that support the type system definition language should
19511950
provide the `@specifiedBy` directive if representing custom scalar definitions.
19521951

19531952
When representing a GraphQL schema using the type system definition language any
1954-
[built-in directive](#sec-Appendix-Built-in-Definitions.Directives) may be
1955-
omitted for brevity.
1953+
_built-in directive_ may be omitted for brevity.
19561954

19571955
When introspecting a GraphQL service all provided directives, including any
1958-
[built-in directive](#sec-Appendix-Built-in-Definitions.Directives), must be
1959-
included in the set of returned directives.
1956+
_built-in directive_, must be included in the set of returned directives.
19601957

19611958
**Custom Directives**
19621959

spec/Section 4 -- Introspection.md

Lines changed: 99 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,106 @@ warnings.
119119

120120
**Schema Introspection Schema**
121121

122-
The schema introspection system is itself represented as a GraphQL schema.
122+
The schema introspection system is itself represented as a GraphQL schema. Below
123+
are the full set of type system definitions providing schema introspection,
124+
which are fully defined in the sections below.
123125

124-
See [Appendix C](#sec-Introspection-types) for more details about the schema
125-
type definitions.
126+
```graphql
127+
type __Schema {
128+
description: String
129+
types: [__Type!]!
130+
queryType: __Type!
131+
mutationType: __Type
132+
subscriptionType: __Type
133+
directives: [__Directive!]!
134+
}
135+
136+
type __Type {
137+
kind: __TypeKind!
138+
name: String
139+
description: String
140+
# must be non-null for OBJECT and INTERFACE, otherwise null.
141+
fields(includeDeprecated: Boolean = false): [__Field!]
142+
# must be non-null for OBJECT and INTERFACE, otherwise null.
143+
interfaces: [__Type!]
144+
# must be non-null for INTERFACE and UNION, otherwise null.
145+
possibleTypes: [__Type!]
146+
# must be non-null for ENUM, otherwise null.
147+
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
148+
# must be non-null for INPUT_OBJECT, otherwise null.
149+
inputFields(includeDeprecated: Boolean = false): [__InputValue!]
150+
# must be non-null for NON_NULL and LIST, otherwise null.
151+
ofType: __Type
152+
# may be non-null for custom SCALAR, otherwise null.
153+
specifiedByURL: String
154+
}
155+
156+
enum __TypeKind {
157+
SCALAR
158+
OBJECT
159+
INTERFACE
160+
UNION
161+
ENUM
162+
INPUT_OBJECT
163+
LIST
164+
NON_NULL
165+
}
166+
167+
type __Field {
168+
name: String!
169+
description: String
170+
args(includeDeprecated: Boolean = false): [__InputValue!]!
171+
type: __Type!
172+
isDeprecated: Boolean!
173+
deprecationReason: String
174+
}
175+
176+
type __InputValue {
177+
name: String!
178+
description: String
179+
type: __Type!
180+
defaultValue: String
181+
isDeprecated: Boolean!
182+
deprecationReason: String
183+
}
184+
185+
type __EnumValue {
186+
name: String!
187+
description: String
188+
isDeprecated: Boolean!
189+
deprecationReason: String
190+
}
191+
192+
type __Directive {
193+
name: String!
194+
description: String
195+
locations: [__DirectiveLocation!]!
196+
args(includeDeprecated: Boolean = false): [__InputValue!]!
197+
isRepeatable: Boolean!
198+
}
199+
200+
enum __DirectiveLocation {
201+
QUERY
202+
MUTATION
203+
SUBSCRIPTION
204+
FIELD
205+
FRAGMENT_DEFINITION
206+
FRAGMENT_SPREAD
207+
INLINE_FRAGMENT
208+
VARIABLE_DEFINITION
209+
SCHEMA
210+
SCALAR
211+
OBJECT
212+
FIELD_DEFINITION
213+
ARGUMENT_DEFINITION
214+
INTERFACE
215+
UNION
216+
ENUM
217+
ENUM_VALUE
218+
INPUT_OBJECT
219+
INPUT_FIELD_DEFINITION
220+
}
221+
```
126222

127223
### The \_\_Schema Type
128224

0 commit comments

Comments
 (0)