@@ -2217,9 +2217,7 @@ non-leaf nodes within a _schema coordinate_ cannot be found in the {schema}.
2217
2217
SchemaCoordinate : Name
2218
2218
2219
2219
1. Let {typeName } be the value of {Name }.
2220
- 2. Let {type } be the type in the {schema } named {typeName }.
2221
- 3. If {type } does not exist , return {null }.
2222
- 4. Return {type }.
2220
+ 2. Return the type in the {schema } named {typeName }, or {null } if no such type exists .
2223
2221
2224
2222
SchemaCoordinate : Name . Name
2225
2223
@@ -2228,20 +2226,14 @@ SchemaCoordinate : Name . Name
2228
2226
3. Assert : {type } must exist .
2229
2227
4. If {type } is an Enum type :
2230
2228
1. Let {enumValueName } be the value of the second {Name }.
2231
- 2. Let {enumValue } be the enum value of {type } named {enumValueName }.
2232
- 3. If {enumValue } does not exist , return {null }.
2233
- 4. Return {enumValue }.
2229
+ 2. Return the enum value of {type } named {enumValueName }, or {null } if no such value exists .
2234
2230
5. Otherwise , if {type } is an Input Object type :
2235
2231
1. Let {inputFieldName } be the value of the second {Name }.
2236
- 2. Let {inputField } be the input field of {type } named {inputFieldName }.
2237
- 3. If {inputField } does not exist , return {null }.
2238
- 4. Return {inputField }.
2232
+ 2. Return the input field of {type } named {inputFieldName }, or {null } if no such input field exists .
2239
2233
6. Otherwise :
2240
2234
1. Assert : {type } must be an Object or Interface type .
2241
2235
2. Let {fieldName } be the value of the second {Name }.
2242
- 3. Let {field } be the field of {type } named {fieldName }.
2243
- 4. If {field } does not exist , return {null }.
2244
- 5. Return {field }.
2236
+ 3. Return the field of {type } named {fieldName }, or {null } if no such field exists .
2245
2237
2246
2238
SchemaCoordinate : Name . Name ( Name : )
2247
2239
@@ -2253,27 +2245,21 @@ SchemaCoordinate : Name . Name ( Name : )
2253
2245
6. Let {field } be the field of {type } named {fieldName }.
2254
2246
7. Assert : {field } must exist .
2255
2247
8. Let {fieldArgumentName } be the value of the third {Name }.
2256
- 9. Let {fieldArgument } be the argument of {field } named {fieldArgumentName }.
2257
- 10. If {fieldArgument } does not exist , return {null }.
2258
- 11. Return {fieldArgument }.
2248
+ 9. Return the argument of {field } named {fieldArgumentName }, or {null } if no such argument exists .
2259
2249
2260
2250
SchemaCoordinate : @ Name
2261
2251
2262
2252
1. Let {directiveName } be the value of the first {Name }.
2263
- 2. Let {directive } be the directive in the {schema } named {directiveName }.
2264
- 3. If {directive } does not exist , return {null }.
2265
- 4. Return {directive }.
2253
+ 2. Return the directive in the {schema } named {directiveName }, or {null } if no such directive exists .
2266
2254
2267
2255
SchemaCoordinate : @ Name ( Name : )
2268
2256
2269
2257
1. Let {directiveName } be the value of the first {Name }.
2270
2258
2. Let {directive } be the directive in the {schema } named {directiveName }.
2271
2259
3. Assert : {directive } must exist .
2272
2260
4. Let {directiveArgumentName } be the value of the second {Name }.
2273
- 5. Let {directiveArgument } be the argument of {directive } named
2274
- {directiveArgumentName }.
2275
- 6. If {directiveArgument } does not exist , return {null }.
2276
- 7. Return {directiveArgument }.
2261
+ 5. Return the argument of {directive } named
2262
+ {directiveArgumentName }, or {null } if no such argument exists .
2277
2263
2278
2264
**Examples **
2279
2265
0 commit comments