@@ -2174,17 +2174,20 @@ scalar UUID @specifiedBy(url: "https://tools.ietf.org/html/rfc4122")
2174
2174
SchemaCoordinate :
2175
2175
2176
2176
- TypeCoordinate
2177
- - MemberCoordinate
2177
+ - FieldCoordinate
2178
2178
- ArgumentCoordinate
2179
+ - ValueCoordinate
2179
2180
- DirectiveCoordinate
2180
2181
- DirectiveArgumentCoordinate
2181
2182
2182
2183
TypeCoordinate : Name
2183
2184
2184
- MemberCoordinate : Name . Name
2185
+ FieldCoordinate : Name . Name
2185
2186
2186
2187
ArgumentCoordinate : Name . Name ( Name : )
2187
2188
2189
+ ValueCoordinate : Name :: Name
2190
+
2188
2191
DirectiveCoordinate : @ Name
2189
2192
2190
2193
DirectiveArgumentCoordinate : @ Name ( Name : )
@@ -2195,6 +2198,16 @@ _schema element_ within a GraphQL Schema.
2195
2198
:: A _schema element_ can be a named type , a field , an input field , an enum
2196
2199
value , a field argument , a directive , or a directive argument .
2197
2200
2201
+ :: The _containing element_ of a _schema element_ is the schema element with one
2202
+ fewer {Name } token that syntactically contains it . For example :
2203
+
2204
+ - The containing element of an {ArgumentCoordinate } or
2205
+ {DirectiveArgumentCoordinate } is the corresponding {FieldCoordinate } or
2206
+ {DirectiveCoordinate } respectively .
2207
+ - The containing element of a {FieldCoordinate } or {ValueCoordinate } is its
2208
+ containing {TypeCoordinate }.
2209
+ - {TypeCoordinate } and {DirectiveCoordinate } have no containing element .
2210
+
2198
2211
A _schema coordinate_ is always unique . Each _schema element_ can be referenced
2199
2212
by exactly one possible schema coordinate .
2200
2213
@@ -2220,31 +2233,27 @@ production.
2220
2233
To refer to a _schema element_ , a _schema coordinate_ must be interpreted in the
2221
2234
context of a GraphQL {schema }.
2222
2235
2223
- If the _schema element_ cannot be found , the resolve function will not yield a
2224
- value (without raising an error). However , an error will be raised if any
2225
- non - leaf nodes within a _schema coordinate_ cannot be found in the { schema } .
2236
+ If the _schema element_ cannot be found , and either it has no _containing
2237
+ element_ or its _containing element_ exists and is of the expected type , the
2238
+ resolve function returns { null }. Otherwise , an error is raised .
2226
2239
2227
2240
TypeCoordinate : Name
2228
2241
2229
2242
1. Let {typeName } be the value of {Name }.
2230
2243
2. Return the type in the {schema } named {typeName }, or {null } if no such type
2231
2244
exists .
2232
2245
2233
- MemberCoordinate : Name . Name
2246
+ FieldCoordinate : Name . Name
2234
2247
2235
2248
1. Let {typeName } be the value of the first {Name }.
2236
2249
2. Let {type } be the type in the {schema } named {typeName }.
2237
- 3. Assert : {type } must exist , and must be an Enum , Input Object , Object or
2238
- Interface type .
2239
- 4. If {type } is an Enum type :
2240
- 1. Let {enumValueName } be the value of the second {Name }.
2241
- 2. Return the enum value of {type } named {enumValueName }, or {null } if no
2242
- such value exists .
2243
- 5. Otherwise , if {type } is an Input Object type :
2250
+ 3. Assert : {type } must exist , and must be an Input Object , Object or Interface
2251
+ type .
2252
+ 4. If {type } is an Input Object type :
2244
2253
1. Let {inputFieldName } be the value of the second {Name }.
2245
2254
2. Return the input field of {type } named {inputFieldName }, or {null } if no
2246
2255
such input field exists .
2247
- 6 . Otherwise :
2256
+ 5 . Otherwise :
2248
2257
1. Let {fieldName } be the value of the second {Name }.
2249
2258
2. Return the field of {type } named {fieldName }, or {null } if no such field
2250
2259
exists .
@@ -2261,6 +2270,15 @@ ArgumentCoordinate : Name . Name ( Name : )
2261
2270
8. Return the argument of {field } named {fieldArgumentName }, or {null } if no
2262
2271
such argument exists .
2263
2272
2273
+ ValueCoordinate : Name :: Name
2274
+
2275
+ 1. Let {typeName } be the value of the first {Name }.
2276
+ 2. Let {type } be the type in the {schema } named {typeName }.
2277
+ 3. Assert : {type } must exist , and must be an Enum type .
2278
+ 4. Let {enumValueName } be the value of the second {Name }.
2279
+ 5. Return the enum value of {type } named {enumValueName }, or {null } if no such
2280
+ value exists .
2281
+
2264
2282
DirectiveCoordinate : @ Name
2265
2283
2266
2284
1. Let {directiveName } be the value of {Name }.
@@ -2283,8 +2301,8 @@ DirectiveArgumentCoordinate : @ Name ( Name : )
2283
2301
| Named Type | `Business ` | `Business ` type |
2284
2302
| Field | `Business .name ` | `name ` field on the `Business ` type |
2285
2303
| Input Field | `SearchCriteria .filter ` | `filter ` input field on the `SearchCriteria ` input object type |
2286
- | Enum Value | `SearchFilter .OPEN_NOW ` | `OPEN_NOW ` value of the `SearchFilter ` enum |
2287
2304
| Field Argument | `Query .searchBusiness (criteria :)` | `criteria ` argument on the `searchBusiness ` field on the `Query ` type |
2305
+ | Enum Value | `SearchFilter ::OPEN_NOW ` | `OPEN_NOW ` value of the `SearchFilter ` enum |
2288
2306
| Directive | `@private ` | `@private ` directive |
2289
2307
| Directive Argument | `@private (scope :)` | `scope ` argument on the `@private ` directive |
2290
2308
0 commit comments