@@ -291,7 +291,8 @@ There are three types of operations that GraphQL models:
291
291
- subscription - a long-lived request that fetches data in response to source
292
292
events.
293
293
294
- Each operation is represented by an optional operation name and a selection set.
294
+ Each operation is represented by an optional operation name and a _ selection
295
+ set_ .
295
296
296
297
For example, this mutation operation might "like" a story and then retrieve the
297
298
new number of likes:
@@ -337,6 +338,9 @@ An operation selects the set of information it needs, and will receive exactly
337
338
that information and nothing more, avoiding over-fetching and under-fetching
338
339
data.
339
340
341
+ :: A _ selection set_ defines an ordered set of selections (fields, fragment
342
+ spreads and inline fragments) against an object, union or interface type.
343
+
340
344
``` graphql example
341
345
{
342
346
id
@@ -346,14 +350,14 @@ data.
346
350
```
347
351
348
352
In this query operation, the ` id ` , ` firstName ` , and ` lastName ` fields form a
349
- selection set . Selection sets may also contain fragment references.
353
+ _ selection set _ . Selection sets may also contain fragment references.
350
354
351
355
## Fields
352
356
353
357
Field : Alias? Name Arguments? Directives? SelectionSet?
354
358
355
- A selection set is primarily composed of fields. A field describes one discrete
356
- piece of information available to request within a selection set.
359
+ A _ selection set _ is primarily composed of fields. A field describes one
360
+ discrete piece of information available to request within a selection set.
357
361
358
362
Some fields describe complex data or relationships to other data. In order to
359
363
further explore this data, a field may itself contain a selection set, allowing
@@ -381,7 +385,7 @@ down to scalar values.
381
385
}
382
386
```
383
387
384
- Fields in the top-level selection set of an operation often represent some
388
+ Fields in the top-level _ selection set _ of an operation often represent some
385
389
information that is globally accessible to your application and its current
386
390
viewer. Some typical examples of these top fields include references to a
387
391
current logged-in viewer, or accessing certain types of data referenced by a
@@ -667,9 +671,9 @@ be present and `likers` will not. Conversely when the result is a `Page`,
667
671
668
672
InlineFragment : ... TypeCondition? Directives? SelectionSet
669
673
670
- Fragments can also be defined inline within a selection set . This is useful for
671
- conditionally including fields based on a type condition or applying a directive
672
- to a selection set.
674
+ Fragments can also be defined inline within a _ selection set _ . This is useful
675
+ for conditionally including fields based on a type condition or applying a
676
+ directive to a selection set.
673
677
674
678
This feature of standard fragment inclusion was demonstrated in the
675
679
` query FragmentTyping ` example above. We could accomplish the same thing using
@@ -1032,7 +1036,7 @@ BlockStringValue(rawValue):
1032
1036
- Let {lines} be the result of splitting {rawValue} by {LineTerminator}.
1033
1037
- Let {commonIndent} be {null}.
1034
1038
- For each {line} in {lines}:
1035
- - If {line} is the first item in {lines}, continue to the next line.
1039
+ - If {line} is the first item in {lines}, continue to the next { line} .
1036
1040
- Let {length} be the number of characters in {line}.
1037
1041
- Let {indent} be the number of leading consecutive {WhiteSpace} characters in
1038
1042
{line}.
@@ -1117,10 +1121,10 @@ ListValue : [ ]
1117
1121
ListValue : [ Value+ ]
1118
1122
1119
1123
- Let {inputList} be a new empty list value.
1120
- - For each {Value+}
1124
+ - For each {Value+}:
1121
1125
- Let {value} be the result of evaluating {Value}.
1122
1126
- Append {value} to {inputList}.
1123
- - Return {inputList}
1127
+ - Return {inputList}.
1124
1128
1125
1129
### Input Object Values
1126
1130
@@ -1164,11 +1168,11 @@ ObjectValue : { }
1164
1168
ObjectValue : { ObjectField+ }
1165
1169
1166
1170
- Let {inputObject} be a new input object value with no fields.
1167
- - For each {field} in {ObjectField+}
1171
+ - For each {field} in {ObjectField+}:
1168
1172
- Let {name} be {Name} in {field}.
1169
1173
- Let {value} be the result of evaluating {Value} in {field}.
1170
1174
- Add a field to {inputObject} of name {name} containing value {value}.
1171
- - Return {inputObject}
1175
+ - Return {inputObject}.
1172
1176
1173
1177
## Variables
1174
1178
@@ -1247,22 +1251,22 @@ input type.
1247
1251
1248
1252
Type : Name
1249
1253
1250
- - Let {name} be the string value of {Name}
1251
- - Let {type} be the type defined in the Schema named {name}
1252
- - {type} must not be {null}
1253
- - Return {type}
1254
+ - Let {name} be the string value of {Name}.
1255
+ - Let {type} be the type defined in the Schema named {name}.
1256
+ - {type} must not be {null}.
1257
+ - Return {type}.
1254
1258
1255
1259
Type : [ Type ]
1256
1260
1257
- - Let {itemType} be the result of evaluating {Type}
1261
+ - Let {itemType} be the result of evaluating {Type}.
1258
1262
- Let {type} be a List type where {itemType} is the contained type.
1259
- - Return {type}
1263
+ - Return {type}.
1260
1264
1261
1265
Type : Type !
1262
1266
1263
- - Let {nullableType} be the result of evaluating {Type}
1267
+ - Let {nullableType} be the result of evaluating {Type}.
1264
1268
- Let {type} be a Non-Null type where {nullableType} is the contained type.
1265
- - Return {type}
1269
+ - Return {type}.
1266
1270
1267
1271
## Directives
1268
1272
0 commit comments