@@ -217,13 +217,13 @@ enum __DirectiveLocation {
217
217
218
218
### The __ Type Type
219
219
220
- ` __Type ` is at the core of the type introspection system.
221
- It represents scalars, interfaces, object types, unions, enums, input objects types in the system.
222
-
223
- ` __Type ` also represents type modifiers, which are used to modify a type
224
- that it refers to (` ofType: __Type ` ). This is how we represent lists,
225
- non-nullable types, and the combinations thereof.
220
+ ` __Type ` is at the core of the type introspection system, it represents all
221
+ types in the system: both named types (e.g. Scalars and Object types) and
222
+ type modifiers (e.g. List and Non-Null types).
226
223
224
+ Type modifiers are used to modify the type presented in the field ` ofType ` .
225
+ This modified type may recursively be a modified type, representing lists,
226
+ non-nullables, and combinations thereof, ultimately modifying a named type.
227
227
228
228
### Type Kinds
229
229
@@ -346,6 +346,9 @@ Lists represent sequences of values in GraphQL. A List type is a type modifier:
346
346
it wraps another type instance in the `ofType ` field , which defines the type of
347
347
each item in the list .
348
348
349
+ The modified type in the `ofType ` field may itself be a modified type , allowing
350
+ the representation of Lists of Lists , or Lists of Non -Nulls .
351
+
349
352
Fields
350
353
351
354
* `kind ` must return `__TypeKind .LIST `.
@@ -357,12 +360,16 @@ Fields
357
360
358
361
GraphQL types are nullable . The value {null } is a valid response for field type .
359
362
360
- A Non -null type is a type modifier : it wraps another type instance in the
363
+ A Non -Null type is a type modifier : it wraps another type instance in the
361
364
`ofType ` field . Non -null types do not allow {null } as a response , and indicate
362
365
required inputs for arguments and input object fields .
363
366
367
+ The modified type in the `ofType ` field may itself be a modified List type ,
368
+ allowing the representation of Non -Null of Lists . However it must not be a
369
+ modified Non -Null type to avoid a redundant Non -Null of Non -Null .
370
+
364
371
* `kind ` must return `__TypeKind .NON_NULL `.
365
- * `ofType `: Any type except Non -null .
372
+ * `ofType `: Any type except Non -Null .
366
373
* All other fields must return {null }.
367
374
368
375
0 commit comments