@@ -2233,17 +2233,20 @@ scalar UUID @specifiedBy(url: "https://tools.ietf.org/html/rfc4122")
2233
2233
SchemaCoordinate :
2234
2234
2235
2235
- TypeCoordinate
2236
- - MemberCoordinate
2236
+ - FieldCoordinate
2237
2237
- ArgumentCoordinate
2238
+ - ValueCoordinate
2238
2239
- DirectiveCoordinate
2239
2240
- DirectiveArgumentCoordinate
2240
2241
2241
2242
TypeCoordinate : Name
2242
2243
2243
- MemberCoordinate : Name . Name
2244
+ FieldCoordinate : Name . Name
2244
2245
2245
2246
ArgumentCoordinate : Name . Name ( Name : )
2246
2247
2248
+ ValueCoordinate : Name :: Name
2249
+
2247
2250
DirectiveCoordinate : @ Name
2248
2251
2249
2252
DirectiveArgumentCoordinate : @ Name ( Name : )
@@ -2254,6 +2257,16 @@ _schema element_ within a GraphQL Schema.
2254
2257
:: A _schema element_ can be a named type , a field , an input field , an enum
2255
2258
value , a field argument , a directive , or a directive argument .
2256
2259
2260
+ :: The _containing element_ of a _schema element_ is the schema element with one
2261
+ fewer {Name } token that syntactically contains it . For example :
2262
+
2263
+ - The containing element of an {ArgumentCoordinate } or
2264
+ {DirectiveArgumentCoordinate } is the corresponding {FieldCoordinate } or
2265
+ {DirectiveCoordinate } respectively .
2266
+ - The containing element of a {FieldCoordinate } or {ValueCoordinate } is its
2267
+ containing {TypeCoordinate }.
2268
+ - {TypeCoordinate } and {DirectiveCoordinate } have no containing element .
2269
+
2257
2270
A _schema coordinate_ is always unique . Each _schema element_ can be referenced
2258
2271
by exactly one possible schema coordinate .
2259
2272
@@ -2279,31 +2292,27 @@ production.
2279
2292
To refer to a _schema element_ , a _schema coordinate_ must be interpreted in the
2280
2293
context of a GraphQL {schema }.
2281
2294
2282
- If the _schema element_ cannot be found , the resolve function will not yield a
2283
- value (without raising an error). However , an error will be raised if any
2284
- non - leaf nodes within a _schema coordinate_ cannot be found in the { schema } .
2295
+ If the _schema element_ cannot be found , and either it has no _containing
2296
+ element_ or its _containing element_ exists and is of the expected type , the
2297
+ resolve function returns { null }. Otherwise , an error is raised .
2285
2298
2286
2299
TypeCoordinate : Name
2287
2300
2288
2301
1. Let {typeName } be the value of {Name }.
2289
2302
2. Return the type in the {schema } named {typeName }, or {null } if no such type
2290
2303
exists .
2291
2304
2292
- MemberCoordinate : Name . Name
2305
+ FieldCoordinate : Name . Name
2293
2306
2294
2307
1. Let {typeName } be the value of the first {Name }.
2295
2308
2. Let {type } be the type in the {schema } named {typeName }.
2296
- 3. Assert : {type } must exist , and must be an Enum , Input Object , Object or
2297
- Interface type .
2298
- 4. If {type } is an Enum type :
2299
- 1. Let {enumValueName } be the value of the second {Name }.
2300
- 2. Return the enum value of {type } named {enumValueName }, or {null } if no
2301
- such value exists .
2302
- 5. Otherwise , if {type } is an Input Object type :
2309
+ 3. Assert : {type } must exist , and must be an Input Object , Object or Interface
2310
+ type .
2311
+ 4. If {type } is an Input Object type :
2303
2312
1. Let {inputFieldName } be the value of the second {Name }.
2304
2313
2. Return the input field of {type } named {inputFieldName }, or {null } if no
2305
2314
such input field exists .
2306
- 6 . Otherwise :
2315
+ 5 . Otherwise :
2307
2316
1. Let {fieldName } be the value of the second {Name }.
2308
2317
2. Return the field of {type } named {fieldName }, or {null } if no such field
2309
2318
exists .
@@ -2320,6 +2329,15 @@ ArgumentCoordinate : Name . Name ( Name : )
2320
2329
8. Return the argument of {field } named {fieldArgumentName }, or {null } if no
2321
2330
such argument exists .
2322
2331
2332
+ ValueCoordinate : Name :: Name
2333
+
2334
+ 1. Let {typeName } be the value of the first {Name }.
2335
+ 2. Let {type } be the type in the {schema } named {typeName }.
2336
+ 3. Assert : {type } must exist , and must be an Enum type .
2337
+ 4. Let {enumValueName } be the value of the second {Name }.
2338
+ 5. Return the enum value of {type } named {enumValueName }, or {null } if no such
2339
+ value exists .
2340
+
2323
2341
DirectiveCoordinate : @ Name
2324
2342
2325
2343
1. Let {directiveName } be the value of {Name }.
@@ -2342,8 +2360,8 @@ DirectiveArgumentCoordinate : @ Name ( Name : )
2342
2360
| Named Type | `Business ` | `Business ` type |
2343
2361
| Field | `Business .name ` | `name ` field on the `Business ` type |
2344
2362
| Input Field | `SearchCriteria .filter ` | `filter ` input field on the `SearchCriteria ` input object type |
2345
- | Enum Value | `SearchFilter .OPEN_NOW ` | `OPEN_NOW ` value of the `SearchFilter ` enum |
2346
2363
| Field Argument | `Query .searchBusiness (criteria :)` | `criteria ` argument on the `searchBusiness ` field on the `Query ` type |
2364
+ | Enum Value | `SearchFilter ::OPEN_NOW ` | `OPEN_NOW ` value of the `SearchFilter ` enum |
2347
2365
| Directive | `@private ` | `@private ` directive |
2348
2366
| Directive Argument | `@private (scope :)` | `scope ` argument on the `@private ` directive |
2349
2367
0 commit comments