@@ -5,17 +5,20 @@ Schema Coordinates are human readable strings that uniquely identify an element
5
5
## Definition
6
6
7
7
SchemaCoordinates :
8
- - TypeName FieldSpecifier?
9
- - InterfaceName FieldSpecifier?
8
+ - TypeDefinitionName FieldSpecifier?
10
9
- EnumName EnumValueSpecifier?
11
10
- @ DirectiveName ArgumentSpecifier?
12
11
- UnionName
13
12
13
+ TypeDefinitionName:
14
+ - ObjectTypeName
15
+ - InterfaceTypeName
16
+
14
17
FieldSpecifier :
15
18
- . FieldName ArgumentSpecifier?
16
19
17
20
ArgumentSpecifier :
18
- - ( ArgumentName )
21
+ - ( ArgumentName: )
19
22
20
23
EnumValueSpecifier :
21
24
- . EnumValue
@@ -61,108 +64,30 @@ type Query {
61
64
}
62
65
```
63
66
64
- **Selecting a Type **
65
-
66
- Schema Coordinates for the `Business ` type :
67
-
68
- ```example
69
- Business
70
- ```
71
-
72
- Schema Coordinates for the ` User ` type:
73
-
74
- ``` example
75
- User
76
- ```
77
-
78
- ** Selecting a Field on a Type**
79
-
80
- Schema Coordinates for the ` name ` field on the ` Business ` type:
81
-
82
- ``` example
83
- Business.name
84
- ```
85
-
86
- Schema Coordinates for the ` name ` field on the ` User ` type:
67
+ The following table demonstrates how to select various kinds of schema elements:
87
68
88
- ``` example
89
- User.name
90
- ```
91
-
92
- ** Selecting an Argument on a Field**
93
-
94
- Schema Coordinates for the ` name ` argument on the ` searchBusiness ` field on the ` Query ` type:
95
-
96
- ``` example
97
- Query.searchBusiness(name)
98
- ```
99
-
100
- Schema Coordinates for the ` filter ` argument on the ` searchBusiness ` field on the ` Query ` type:
101
-
102
- ``` example
103
- Query.searchBusiness(filter)
104
- ```
105
-
106
- ** Selecting an Enum**
107
-
108
- Schema Coordinates for the ` SearchFilter ` enum:
109
-
110
- ``` example
111
- SearchFilter
112
- ```
69
+ | Example | Description |
70
+ | ------------------------------ | ------------------------------------------------------------------- |
71
+ | `Business` | `Business` type |
72
+ | `User` | `User` type |
73
+ | `Business.name` | `name` field on the `Business` type |
74
+ | `User.name` | `name` field on the `User` type |
75
+ | `Query.searchBusiness(name:)` | `name` argument on the `searchBusiness` field on the `Query` type |
76
+ | `Query.searchBusiness(filter:)`| `filter` argument on the `searchBusiness` field on the `Query` type |
77
+ | `SearchFilter` | `SearchFilter` enum |
78
+ | `SearchFilter.OPEN_NOW` | `OPEN_NOW` value of the`SearchFilter` enum |
79
+ | `@private ` | `@private ` directive definition |
80
+ | `@private (scope :)` | `scope` argument on the `@private ` directive definition |
81
+ | `Address` | `Address` interface |
82
+ | `Address.city` | `city` field on the `Address` interface |
83
+ | `Entity` | `Entity` union definition |
113
84
114
- ** Selecting an Enum Value**
115
-
116
- Schema Coordinates for the ` OPEN_NOW ` value of the` SearchFilter ` enum:
117
-
118
- ``` example
119
- SearchFilter.OPEN_NOW
120
- ```
121
-
122
- ** Selecting a Directive Definition**
123
-
124
- Schema Coordinates for the ` @private ` directive definition:
125
-
126
- ``` example
127
- @private
128
- ```
129
-
130
- ** Selecting a Directive Definition Argument**
131
-
132
- Schema Coordinates for the ` scope ` argument on the ` @private ` directive definition:
133
-
134
- ``` example
135
- @private(scope)
136
- ```
137
-
138
- ** Selecting an Interface**
139
-
140
- Schema Coordinates for the ` Address ` interface:
141
-
142
- ``` example
143
- Address
144
- ```
145
-
146
- ** Selecting a Field on an Interface**
147
-
148
- Schema Coordinates for the ` city ` field on the ` Address ` interface:
149
-
150
- ``` example
151
- Address.city
152
- ```
153
-
154
- ** Selecting a Union**
155
-
156
- Schema Coordinates for the ` Entity ` union definition:
157
-
158
- ``` example
159
- Entity
160
- ```
85
+ Note: You may not select members inside a union definition.
161
86
162
- You may not select members inside a union definition.
87
+ The following counter example are *not* considered valid Schema Coordinates:
163
88
164
89
```graphql counter-example
165
90
Entity.Business
166
91
```
167
92
168
- In such cases, you may wish to [ select the type directly] ( #sec-Examples.Selecting-a-Type ) instead .
93
+ In such cases, you may wish to select the type directly instead (e.g. `Business`) .
0 commit comments