Skip to content

Commit 1d1a99b

Browse files
committed
Describe how non-null and list types are written earlier.
1 parent 140fa56 commit 1d1a99b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Section 3 -- Type System.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,8 @@ type declared by the input field.
669669
A GraphQL list is a special collection type which declares the type of each
670670
item in the List (referred to as the *item type* of the list). List values are
671671
serialized as ordered lists, where each item in the array is serialized as per
672-
the item type.
672+
the item type. To denote that a field uses a List type the item type is wrapped
673+
in square brackets like this: `pets: [Pet]`.
673674

674675
**Result Coercion**
675676

@@ -697,7 +698,9 @@ By default, all types in GraphQL are nullable; the {null} value is a valid
697698
response for all of the above types. To declare a type that disallows null,
698699
the GraphQL Non-Null type can be used. This type declares an underlying type,
699700
and this type acts identically to that underlying type, with the exception
700-
that `null` is not a valid response for the wrapping type.
701+
that `null` is not a valid response for the wrapping type. A trailing
702+
exclamation mark is used to denote a field that uses a Non-Null type like this:
703+
`name: String!`.
701704

702705
**Result Coercion**
703706

0 commit comments

Comments
 (0)