Skip to content

Commit 3494138

Browse files
committed
Editorial: Define type definitions
This broad change uses definition phrases to define each type, as well as expands the set of sub-sections at the top of the "Types" section which define *kinds* of types. In doing so applies the definitions arrived at in #845 for "wrapped types". Makes editorial improvements throughout, removing duplicate language or attempting to improve correctness or legibility.
1 parent fdeb37d commit 3494138

File tree

5 files changed

+312
-273
lines changed

5 files changed

+312
-273
lines changed

spec/Section 2 -- Language.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ object).
620620

621621
Fragments can be specified on object types, interfaces, and unions.
622622

623-
Selections within fragments only return values when the concrete type of the object
623+
Selections within fragments only return values when the *concrete Object type*
624624
it is operating on matches the type of the fragment.
625625

626626
For example in this operation using the Facebook data model:
@@ -1048,14 +1048,14 @@ ObjectValue[Const] :
10481048

10491049
ObjectField[Const] : Name : Value[?Const]
10501050

1051-
Input object literal values are unordered lists of keyed input values wrapped in
1051+
Input Object literal values are unordered lists of keyed input values wrapped in
10521052
curly-braces `{ }`. The values of an object literal may be any input value
10531053
literal or variable (ex. `{ name: "Hello world", score: 1.0 }`). We refer to
1054-
literal representation of input objects as "object literals."
1054+
literal representation of Input Objects as "object literals."
10551055

1056-
**Input object fields are unordered**
1056+
**Input Object fields are unordered**
10571057

1058-
Input object fields may be provided in any syntactic order and maintain
1058+
Input Object fields may be provided in any syntactic order and maintain
10591059
identical semantic meaning.
10601060

10611061
These two operations are semantically identical:
@@ -1076,11 +1076,11 @@ These two operations are semantically identical:
10761076

10771077
ObjectValue : { }
10781078

1079-
* Return a new input object value with no fields.
1079+
* Return a new Input Object value with no fields.
10801080

10811081
ObjectValue : { ObjectField+ }
10821082

1083-
* Let {inputObject} be a new input object value with no fields.
1083+
* Let {inputObject} be a new Input Object value with no fields.
10841084
* For each {field} in {ObjectField+}
10851085
* Let {name} be {Name} in {field}.
10861086
* Let {value} be the result of evaluating {Value} in {field}.
@@ -1154,9 +1154,8 @@ NonNullType :
11541154
- NamedType !
11551155
- ListType !
11561156

1157-
GraphQL describes the types of data expected by arguments and variables.
1158-
Input types may be lists of another input type, or a non-null variant of any
1159-
other input type.
1157+
GraphQL describes the *input type* of data expected by arguments and variables,
1158+
and the *output type* of fields.
11601159

11611160
**Semantics**
11621161

@@ -1170,13 +1169,14 @@ Type : Name
11701169
Type : [ Type ]
11711170

11721171
* Let {itemType} be the result of evaluating {Type}
1173-
* Let {type} be a List type where {itemType} is the contained type.
1172+
* Let {type} be a *List type* wrapping {itemType} as its *item type*.
11741173
* Return {type}
11751174

11761175
Type : Type !
11771176

11781177
* Let {nullableType} be the result of evaluating {Type}
1179-
* Let {type} be a Non-Null type where {nullableType} is the contained type.
1178+
* Let {type} be a *Non-Null type* wrapping {nullableType} as its
1179+
*nullable type*.
11801180
* Return {type}
11811181

11821182

@@ -1194,7 +1194,7 @@ behavior in ways field arguments will not suffice, such as conditionally
11941194
including or skipping a field. Directives provide this by describing additional information to the executor.
11951195

11961196
Directives have a name along with a list of arguments which may accept values
1197-
of any input type.
1197+
of any *input type*.
11981198

11991199
Directives can be used to describe additional information for types, fields,
12001200
fragments and operations.

0 commit comments

Comments
 (0)