@@ -2168,26 +2168,27 @@ scalar UUID @specifiedBy(url: "https://tools.ietf.org/html/rfc4122")
2168
2168
## Schema Coordinates
2169
2169
2170
2170
SchemaCoordinate :
2171
- - Name
2172
- - Name . Name
2173
- - Name . Name ( Name : )
2174
- - @ Name
2175
- - @ Name ( Name : )
2176
2171
2177
- :: A *schema coordinate * is a human readable string that uniquely identifies a
2178
- *schema element * within a GraphQL Schema .
2172
+ - Name
2173
+ - Name . Name
2174
+ - Name . Name ( Name : )
2175
+ - @ Name
2176
+ - @ Name ( Name : )
2179
2177
2180
- :: A *schema element * is a specific instance of a named type , field , input
2178
+ :: A _schema coordinate_ is a human readable string that uniquely identifies a
2179
+ _schema element_ within a GraphQL Schema .
2180
+
2181
+ :: A _schema element_ is a specific instance of a named type , field , input
2181
2182
field , enum value , field argument , directive , or directive argument .
2182
2183
2183
- A * schema coordinate * is always unique . Each * schema element * may be referenced
2184
+ A _schema coordinate_ is always unique . Each _schema element_ may be referenced
2184
2185
by exactly one possible schema coordinate . There is a bidirectional 1:1 mapping .
2185
2186
2186
- A * schema coordinate * may refer to either a defined or built -in * schema element *.
2187
- For example , `String ` and `@deprecated (reason :)` are both valid schema
2187
+ A _schema coordinate_ may refer to either a defined or built -in _schema
2188
+ element_ . For example , `String ` and `@deprecated (reason :)` are both valid schema
2188
2189
coordinates which refer to built -in schema elements . However it must not refer
2189
- to a meta -field . For example , `Business .__typename ` is * not * a valid
2190
- schema coordinate .
2190
+ to a meta -field . For example , `Business .__typename ` is _not_ a valid schema
2191
+ coordinate .
2191
2192
2192
2193
Note : Unions members are not valid schema coordinates since they are references
2193
2194
to existing types in the schema . This preserves the 1:1 mapping property of
@@ -2196,68 +2197,73 @@ schema coordinates as stated above.
2196
2197
Note : A {SchemaCoordinate } is not a definition within a GraphQL {Document }, but
2197
2198
a separate standalone grammar , intended to be used by tools to reference types ,
2198
2199
fields , and other *schema element *s . Examples include : as references within
2199
- documentation to refer to types and fields in a schema , a lookup key that can
2200
- be used in logging tools to track how often particular fields are queried in
2200
+ documentation to refer to types and fields in a schema , a lookup key that can be
2201
+ used in logging tools to track how often particular fields are queried in
2201
2202
production .
2202
2203
2203
2204
**Semantics **
2204
2205
2205
- To refer to a * schema element * , a * schema coordinate * must be interpreted in the
2206
+ To refer to a _schema element_ , a _schema coordinate_ must be interpreted in the
2206
2207
context of a GraphQL {schema }.
2207
2208
2208
2209
SchemaCoordinate : Name
2209
- 1. Let {typeName } be the value of the first {Name }.
2210
- 2. Return the type in the {schema } named {typeName }.
2210
+
2211
+ 1. Let {typeName } be the value of the first {Name }.
2212
+ 2. Return the type in the {schema } named {typeName }.
2211
2213
2212
2214
SchemaCoordinate : Name . Name
2213
- 1. Let {typeName } be the value of the first {Name }.
2214
- 2. Let {type } be the type in the {schema } named {typeName }.
2215
- 3. If {type } is an Enum type :
2216
- 1. Let {enumValueName } be the value of the second {Name }.
2217
- 2. Return the enum value of {type } named {enumValueName }.
2218
- 4. Otherwise if {type } is an Input Object type :
2219
- 1. Let {inputFieldName } be the value of the second {Name }.
2220
- 2. Return the input field of {type } named {inputFieldName }.
2221
- 5. Otherwise :
2222
- 1. Assert {type } must be an Object or Interface type .
2223
- 2. Let {fieldName } be the value of the second {Name }.
2224
- 3. Return the field of {type } named {fieldName }.
2215
+
2216
+ 1. Let {typeName } be the value of the first {Name }.
2217
+ 2. Let {type } be the type in the {schema } named {typeName }.
2218
+ 3. If {type } is an Enum type :
2219
+ 4. Let {enumValueName } be the value of the second {Name }.
2220
+ 5. Return the enum value of {type } named {enumValueName }.
2221
+ 6. Otherwise if {type } is an Input Object type :
2222
+ 7. Let {inputFieldName } be the value of the second {Name }.
2223
+ 8. Return the input field of {type } named {inputFieldName }.
2224
+ 9. Otherwise :
2225
+ 10. Assert {type } must be an Object or Interface type .
2226
+ 11. Let {fieldName } be the value of the second {Name }.
2227
+ 12. Return the field of {type } named {fieldName }.
2225
2228
2226
2229
SchemaCoordinate : Name . Name ( Name : )
2227
- 1. Let {typeName } be the value of the first {Name }.
2228
- 2. Let {type } be the type in the {schema } named {typeName }.
2229
- 3. Assert {type } must be an Object or Interface type .
2230
- 4. Let {fieldName } be the value of the second {Name }.
2231
- 5. Let {field } be the field of {type } named {fieldName }.
2232
- 6. Assert {field } must exist .
2233
- 7. Let {fieldArgumentName } be the value of the third {Name }.
2234
- 8. Return the argument of {field } named {fieldArgumentName }.
2230
+
2231
+ 1. Let {typeName } be the value of the first {Name }.
2232
+ 2. Let {type } be the type in the {schema } named {typeName }.
2233
+ 3. Assert {type } must be an Object or Interface type .
2234
+ 4. Let {fieldName } be the value of the second {Name }.
2235
+ 5. Let {field } be the field of {type } named {fieldName }.
2236
+ 6. Assert {field } must exist .
2237
+ 7. Let {fieldArgumentName } be the value of the third {Name }.
2238
+ 8. Return the argument of {field } named {fieldArgumentName }.
2235
2239
2236
2240
SchemaCoordinate : @ Name
2237
- 1. Let {directiveName } be the value of the first {Name }.
2238
- 2. Return the directive in the {schema } named {directiveName }.
2241
+
2242
+ 1. Let {directiveName } be the value of the first {Name }.
2243
+ 2. Return the directive in the {schema } named {directiveName }.
2239
2244
2240
2245
SchemaCoordinate : @ Name ( Name : )
2241
- 1. Let {directiveName } be the value of the first {Name }.
2242
- 2. Let {directive } be the directive in the {schema } named {directiveName }.
2243
- 3. Assert {directive } must exist .
2244
- 4. Let {directiveArgumentName } be the value of the second {Name }.
2245
- 5. Return the argument of {directive } named {directiveArgumentName }.
2246
+
2247
+ 1. Let {directiveName } be the value of the first {Name }.
2248
+ 2. Let {directive } be the directive in the {schema } named {directiveName }.
2249
+ 3. Assert {directive } must exist .
2250
+ 4. Let {directiveArgumentName } be the value of the second {Name }.
2251
+ 5. Return the argument of {directive } named {directiveArgumentName }.
2246
2252
2247
2253
**Examples **
2248
2254
2249
- | Element Kind | * Schema Coordinate * | * Schema Element * |
2250
- | ------------------ | -------------------------------- | -- --------------------------------------------------------------------- |
2251
- | Named Type | `Business ` | `Business ` type |
2252
- | Field | `Business .name ` | `name ` field on the `Business ` type |
2253
- | Input Field | `SearchCriteria .filter ` | `filter ` input field on the `SearchCriteria ` input object type |
2254
- | Enum Value | `SearchFilter .OPEN_NOW ` | `OPEN_NOW ` value of the `SearchFilter ` enum |
2255
- | Field Argument | `Query .searchBusiness (criteria :)`| `criteria ` argument on the `searchBusiness ` field on the `Query ` type |
2256
- | Directive | `@private ` | `@private ` directive |
2257
- | Directive Argument | `@private (scope :)` | `scope ` argument on the `@private ` directive |
2258
-
2259
- The table above shows an example of a * schema coordinate * for every kind of
2260
- * schema element * based on the schema below .
2255
+ | Element Kind | _Schema Coordinate_ | _Schema Element_ |
2256
+ | ------------------ | --------------------------------- | --------------------------------------------------------------------- |
2257
+ | Named Type | `Business ` | `Business ` type |
2258
+ | Field | `Business .name ` | `name ` field on the `Business ` type |
2259
+ | Input Field | `SearchCriteria .filter ` | `filter ` input field on the `SearchCriteria ` input object type |
2260
+ | Enum Value | `SearchFilter .OPEN_NOW ` | `OPEN_NOW ` value of the `SearchFilter ` enum |
2261
+ | Field Argument | `Query .searchBusiness (criteria :)` | `criteria ` argument on the `searchBusiness ` field on the `Query ` type |
2262
+ | Directive | `@private ` | `@private ` directive |
2263
+ | Directive Argument | `@private (scope :)` | `scope ` argument on the `@private ` directive |
2264
+
2265
+ The table above shows an example of a _schema coordinate_ for every kind of
2266
+ _schema element_ based on the schema below .
2261
2267
2262
2268
```graphql
2263
2269
type Query {
0 commit comments