graphql 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe7641dffd14c00880e603f8184ad21a9611d83c
4
- data.tar.gz: 321e498e40d82ef2e693fc5ed75873af5b252620
3
+ metadata.gz: c1aafd43a1c33e73554a5e5231efd24bfdf236de
4
+ data.tar.gz: f0d8e2e7225fce433a02976d7b61195afea4c573
5
5
  SHA512:
6
- metadata.gz: abc31a8400a6552e47c9d0c1f91f4808e677a7d7686c0081953c2120c462b5293c5b9502e3e0dcf7d1795d1f526645f81b74ea9b9c124c4f0ad665abbbaf43a3
7
- data.tar.gz: aff0d44780415b85bc2fa2a4652a26698e253e897e671135d41ff2036a712d2a486db63696ef56d8370aa2c63d7cd8ab76ec00dd474a9f8165e8da3f5e94c8c7
6
+ metadata.gz: 7fd15c75d9467dd23867d281dae3f932f64351a1a18d0010c85ca8c74297e0368e33dc15d3f6265937a09fe4339aadfa387f87e466137d265583577d951bedbc
7
+ data.tar.gz: 39b48cbccf44d3c0c02226d7329dacef7045f5a8acea12cebe56f6ad2ce9fe6b4f0b318bd45699e7965884dbc935df015bb71abdcd65d964af211eca21718344
@@ -95,38 +95,38 @@ end
95
95
 
96
96
  racc_action_table = [
97
97
  10, 11, 12, 128, 100, 78, 138, 138, 77, 138,
98
- 81, 78, 53, 37, 38, 39, 40, 41, 42, 43,
98
+ 81, 32, 53, 37, 38, 39, 40, 41, 42, 43,
99
99
  44, 45, 46, 47, 48, 49, 50, 10, 11, 12,
100
- 81, 81, 60, 81, 138, 138, 136, 214, 214, 74,
100
+ 81, 81, 60, 81, 138, 138, 63, 214, 214, 74,
101
101
  37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
102
- 47, 48, 49, 50, 10, 11, 12, 78, 13, 60,
103
- 10, 11, 12, 138, 13, 182, 125, 83, 38, 39,
102
+ 47, 48, 49, 50, 10, 11, 12, 70, 138, 60,
103
+ 182, 10, 11, 12, 71, 73, 85, 83, 38, 39,
104
104
  40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
105
- 50, 10, 11, 12, 162, 81, 177, 163, 81, 178,
106
- 215, 124, 179, 13, 152, 38, 39, 40, 41, 42,
105
+ 50, 10, 11, 12, 81, 81, 177, 91, 81, 178,
106
+ 215, 81, 179, 81, 152, 38, 39, 40, 41, 42,
107
107
  43, 44, 45, 46, 150, 151, 169, 170, 166, 167,
108
- 168, 176, 10, 11, 12, 123, 13, 177, 122, 125,
109
- 178, 201, 121, 179, 188, 152, 38, 39, 40, 41,
108
+ 168, 176, 10, 11, 12, 81, 81, 177, 100, 81,
109
+ 178, 81, 81, 179, 13, 152, 38, 39, 40, 41,
110
110
  42, 43, 44, 45, 46, 150, 151, 169, 170, 166,
111
- 167, 168, 176, 10, 11, 12, 143, 81, 177, 192,
112
- 117, 178, 13, 81, 179, 81, 152, 38, 39, 40,
111
+ 167, 168, 176, 10, 11, 12, 117, 81, 177, 121,
112
+ 122, 178, 201, 123, 179, 124, 152, 38, 39, 40,
113
113
  41, 42, 43, 44, 45, 46, 150, 151, 169, 170,
114
- 166, 167, 168, 176, 10, 11, 12, 13, 81, 177,
115
- 100, 81, 178, 81, 209, 179, 81, 152, 38, 39,
114
+ 166, 167, 168, 176, 10, 11, 12, 125, 13, 177,
115
+ 13, 78, 178, 136, 78, 179, 143, 152, 38, 39,
116
116
  40, 41, 42, 43, 44, 45, 46, 150, 151, 169,
117
- 170, 166, 167, 168, 176, 10, 11, 12, 81, 212,
118
- 177, 81, 91, 178, 81, 219, 179, 85, 152, 38,
117
+ 170, 166, 167, 168, 176, 10, 11, 12, 162, 163,
118
+ 177, 81, 13, 178, 13, 125, 179, 188, 152, 38,
119
119
  39, 40, 41, 42, 43, 44, 45, 46, 150, 151,
120
- 169, 170, 166, 167, 168, 176, 10, 11, 12, 73,
121
- 71, 70, 63, 32, 81, nil, nil, nil, nil, 37,
120
+ 169, 170, 166, 167, 168, 176, 10, 11, 12, 81,
121
+ 192, 13, 209, 212, 112, 219, nil, nil, nil, 37,
122
122
  38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
123
123
  48, 49, 50, 10, 11, 12, nil, nil, nil, nil,
124
124
  nil, nil, nil, nil, nil, nil, 37, 38, 39, 40,
125
125
  41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
126
126
  10, 11, 12, nil, nil, nil, nil, nil, nil, nil,
127
- nil, nil, nil, 37, 38, 39, 40, 41, 42, 43,
127
+ nil, nil, 187, 37, 38, 39, 40, 41, 42, 43,
128
128
  44, 45, 46, 47, 48, 49, 50, 10, 11, 12,
129
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
129
+ nil, nil, nil, nil, nil, 112, nil, nil, nil, nil,
130
130
  37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
131
131
  47, 48, 49, 50, 10, 11, 12, nil, nil, nil,
132
132
  nil, nil, nil, nil, nil, nil, nil, 37, 38, 39,
@@ -140,20 +140,20 @@ racc_action_table = [
140
140
  nil, nil, nil, nil, nil, nil, nil, nil, 37, 38,
141
141
  39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
142
142
  49, 50, 10, 11, 12, nil, nil, nil, nil, nil,
143
- nil, nil, nil, nil, nil, nil, 38, 39, 40, 41,
143
+ nil, nil, nil, nil, nil, 37, 38, 39, 40, 41,
144
144
  42, 43, 44, 45, 46, 47, 48, 49, 50, 10,
145
145
  11, 12, nil, nil, nil, nil, nil, nil, nil, nil,
146
146
  nil, nil, 37, 38, 39, 40, 41, 42, 43, 44,
147
147
  45, 46, 47, 48, 49, 50, 10, 11, 12, nil,
148
- nil, nil, nil, nil, nil, nil, nil, nil, nil, 37,
148
+ 103, nil, nil, nil, nil, nil, nil, nil, nil, 37,
149
149
  38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
150
150
  48, 49, 50, 10, 11, 12, nil, nil, nil, nil,
151
- nil, 112, nil, nil, nil, nil, 37, 38, 39, 40,
151
+ nil, nil, nil, nil, nil, nil, 37, 38, 39, 40,
152
152
  41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
153
- 10, 11, 12, nil, nil, nil, nil, nil, 112, nil,
153
+ 10, 11, 12, nil, nil, nil, nil, nil, nil, nil,
154
154
  nil, nil, nil, 37, 38, 39, 40, 41, 42, 43,
155
155
  44, 45, 46, 47, 48, 49, 50, 10, 11, 12,
156
- nil, nil, nil, nil, nil, nil, nil, nil, nil, 217,
156
+ nil, nil, nil, nil, nil, 112, nil, nil, nil, nil,
157
157
  37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
158
158
  47, 48, 49, 50, 10, 11, 12, nil, nil, nil,
159
159
  nil, nil, nil, nil, nil, nil, nil, 37, 38, 39,
@@ -161,7 +161,7 @@ racc_action_table = [
161
161
  50, 10, 11, 12, nil, nil, nil, nil, nil, nil,
162
162
  nil, nil, nil, nil, 37, 38, 39, 40, 41, 42,
163
163
  43, 44, 45, 46, 47, 48, 49, 50, 10, 11,
164
- 12, nil, nil, nil, nil, nil, 112, nil, nil, nil,
164
+ 12, nil, nil, nil, nil, nil, nil, nil, nil, nil,
165
165
  nil, 37, 38, 39, 40, 41, 42, 43, 44, 45,
166
166
  46, 47, 48, 49, 50, 10, 11, 12, nil, nil,
167
167
  nil, nil, nil, nil, nil, nil, nil, nil, 37, 38,
@@ -172,229 +172,229 @@ racc_action_table = [
172
172
  11, 12, nil, nil, nil, nil, nil, nil, nil, nil,
173
173
  nil, nil, 37, 38, 39, 40, 41, 42, 43, 44,
174
174
  45, 46, 47, 48, 49, 50, 10, 11, 12, nil,
175
- nil, nil, nil, nil, nil, nil, nil, nil, 204, 37,
175
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 37,
176
176
  38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
177
- 48, 49, 50, 10, 11, 12, nil, 134, nil, nil,
177
+ 48, 49, 50, 10, 11, 12, nil, nil, nil, nil,
178
178
  nil, nil, nil, nil, nil, nil, 37, 38, 39, 40,
179
179
  41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
180
- 10, 11, 12, nil, nil, nil, nil, nil, nil, nil,
180
+ 10, 11, 12, nil, 134, nil, nil, nil, nil, nil,
181
181
  nil, nil, nil, 37, 38, 39, 40, 41, 42, 43,
182
182
  44, 45, 46, 47, 48, 49, 50, 10, 11, 12,
183
183
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
184
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
185
- 47, 48, 49, 50, 10, 11, 12, nil, 103, nil,
186
- nil, nil, nil, nil, nil, nil, nil, 37, 38, 39,
184
+ nil, 38, 39, 40, 41, 42, 43, 44, 45, 46,
185
+ 47, 48, 49, 50, 10, 11, 12, nil, nil, nil,
186
+ nil, nil, 112, nil, nil, nil, nil, 37, 38, 39,
187
187
  40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
188
- 50, 10, 11, 12, nil, nil, nil, nil, nil, 112,
188
+ 50, 10, 11, 12, nil, nil, nil, nil, nil, nil,
189
189
  nil, nil, nil, nil, 37, 38, 39, 40, 41, 42,
190
190
  43, 44, 45, 46, 47, 48, 49, 50, 10, 11,
191
191
  12, nil, nil, nil, nil, nil, nil, nil, nil, nil,
192
- nil, 37, 38, 39, 40, 41, 42, 43, 44, 45,
193
- 46, 47, 48, 49, 50, 10, 11, 12, nil, nil,
192
+ 194, 37, 38, 39, 40, 41, 42, 43, 44, 45,
193
+ 46, 47, 48, 49, 50, 10, 11, 12, nil, 195,
194
194
  nil, nil, nil, nil, nil, nil, nil, nil, 37, 38,
195
195
  39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
196
196
  49, 50, 10, 11, 12, nil, nil, nil, nil, nil,
197
- 112, nil, nil, nil, nil, 37, 38, 39, 40, 41,
197
+ nil, nil, nil, nil, nil, 37, 38, 39, 40, 41,
198
198
  42, 43, 44, 45, 46, 47, 48, 49, 50, 10,
199
- 11, 12, nil, 195, nil, nil, nil, nil, nil, nil,
199
+ 11, 12, nil, nil, nil, nil, nil, 112, nil, nil,
200
200
  nil, nil, 37, 38, 39, 40, 41, 42, 43, 44,
201
201
  45, 46, 47, 48, 49, 50, 10, 11, 12, nil,
202
- nil, nil, nil, nil, 112, nil, nil, nil, nil, 37,
202
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 37,
203
203
  38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
204
204
  48, 49, 50, 10, 11, 12, nil, nil, nil, nil,
205
- nil, nil, nil, nil, nil, nil, 37, 38, 39, 40,
205
+ nil, nil, nil, nil, nil, 204, 37, 38, 39, 40,
206
206
  41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
207
207
  10, 11, 12, nil, nil, nil, nil, nil, nil, nil,
208
- nil, nil, 194, 37, 38, 39, 40, 41, 42, 43,
208
+ nil, nil, 208, 37, 38, 39, 40, 41, 42, 43,
209
209
  44, 45, 46, 47, 48, 49, 50, 10, 11, 12,
210
210
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
211
211
  37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
212
212
  47, 48, 49, 50, 10, 11, 12, nil, nil, nil,
213
213
  nil, nil, nil, nil, nil, nil, nil, 37, 38, 39,
214
214
  40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
215
- 50, 10, 11, 12, nil, nil, nil, nil, nil, nil,
216
- nil, nil, nil, 187, 37, 38, 39, 40, 41, 42,
215
+ 50, 10, 11, 12, nil, nil, nil, nil, nil, 112,
216
+ nil, nil, nil, nil, 37, 38, 39, 40, 41, 42,
217
217
  43, 44, 45, 46, 47, 48, 49, 50, 10, 11,
218
218
  12, nil, nil, nil, nil, nil, nil, nil, nil, nil,
219
219
  nil, 37, 38, 39, 40, 41, 42, 43, 44, 45,
220
220
  46, 47, 48, 49, 50, 10, 11, 12, nil, nil,
221
- nil, nil, nil, nil, nil, nil, nil, 208, 37, 38,
221
+ nil, nil, nil, nil, nil, nil, nil, 217, 37, 38,
222
222
  39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
223
- 49, 50, 10, 11, 12, nil, nil, nil, nil, nil,
223
+ 49, 50, 10, 11, 12, nil, nil, 10, 11, 12,
224
+ nil, nil, nil, 13, nil, nil, 18, 25, 26, 115,
225
+ 27, 28, 29, 30, 31, nil, 14, 10, 11, 12,
226
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
227
+ 152, 38, 39, 40, 41, 42, 43, 44, 45, 46,
228
+ 150, 151, 10, 11, 12, nil, nil, nil, nil, nil,
224
229
  nil, nil, nil, nil, 191, 152, 38, 39, 40, 41,
225
230
  42, 43, 44, 45, 46, 150, 151, 10, 11, 12,
226
- nil, nil, 10, 11, 12, nil, nil, nil, 13, nil,
227
- nil, 18, 25, 26, 115, 27, 28, 29, 30, 31,
228
- nil, 14, 10, 11, 12, nil, nil, nil, nil, nil,
229
- nil, nil, nil, nil, nil, 152, 38, 39, 40, 41,
230
- 42, 43, 44, 45, 46, 150, 151, 10, 11, 12,
231
231
  nil, nil, nil, nil, nil, nil, nil, nil, 13, nil,
232
232
  nil, 18, 25, 26, nil, 27, 28, 29, 30, 31,
233
233
  nil, 14 ]
234
234
 
235
235
  racc_action_check = [
236
236
  13, 13, 13, 98, 98, 59, 111, 114, 59, 220,
237
- 155, 108, 13, 13, 13, 13, 13, 13, 13, 13,
237
+ 221, 1, 13, 13, 13, 13, 13, 13, 13, 13,
238
238
  13, 13, 13, 13, 13, 13, 13, 54, 54, 54,
239
- 111, 114, 13, 220, 211, 198, 106, 211, 198, 54,
239
+ 111, 114, 13, 220, 198, 211, 18, 198, 211, 54,
240
240
  54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
241
- 54, 54, 54, 54, 60, 60, 60, 102, 101, 54,
242
- 63, 63, 63, 140, 97, 140, 96, 60, 60, 60,
241
+ 54, 54, 54, 54, 60, 60, 60, 31, 140, 54,
242
+ 140, 63, 63, 63, 32, 34, 61, 60, 60, 60,
243
243
  60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
244
- 60, 202, 202, 202, 126, 60, 202, 130, 133, 202,
245
- 202, 95, 202, 139, 202, 202, 202, 202, 202, 202,
244
+ 60, 202, 202, 202, 64, 60, 202, 65, 66, 202,
245
+ 202, 67, 202, 68, 202, 202, 202, 202, 202, 202,
246
246
  202, 202, 202, 202, 202, 202, 202, 202, 202, 202,
247
- 202, 202, 178, 178, 178, 94, 141, 178, 93, 145,
248
- 178, 178, 92, 178, 149, 178, 178, 178, 178, 178,
247
+ 202, 202, 214, 214, 214, 69, 72, 214, 73, 76,
248
+ 214, 79, 82, 214, 84, 214, 214, 214, 214, 214,
249
+ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
250
+ 214, 214, 214, 178, 178, 178, 88, 90, 178, 92,
251
+ 93, 178, 178, 94, 178, 95, 178, 178, 178, 178,
249
252
  178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
250
- 178, 178, 178, 136, 136, 136, 118, 90, 136, 158,
251
- 88, 136, 84, 82, 136, 79, 136, 136, 136, 136,
253
+ 178, 178, 178, 178, 136, 136, 136, 96, 97, 136,
254
+ 101, 102, 136, 106, 108, 136, 118, 136, 136, 136,
252
255
  136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
253
- 136, 136, 136, 136, 219, 219, 219, 164, 76, 219,
254
- 73, 72, 219, 69, 185, 219, 68, 219, 219, 219,
256
+ 136, 136, 136, 136, 136, 219, 219, 219, 126, 130,
257
+ 219, 133, 139, 219, 141, 145, 219, 149, 219, 219,
255
258
  219, 219, 219, 219, 219, 219, 219, 219, 219, 219,
256
- 219, 219, 219, 219, 219, 214, 214, 214, 67, 196,
257
- 214, 66, 65, 214, 64, 207, 214, 61, 214, 214,
258
- 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
259
- 214, 214, 214, 214, 214, 214, 117, 117, 117, 34,
260
- 32, 31, 18, 1, 221, nil, nil, nil, nil, 117,
259
+ 219, 219, 219, 219, 219, 219, 83, 83, 83, 155,
260
+ 158, 164, 185, 196, 83, 207, nil, nil, nil, 83,
261
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
262
+ 83, 83, 83, 143, 143, 143, nil, nil, nil, nil,
263
+ nil, nil, nil, nil, nil, nil, 143, 143, 143, 143,
264
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
265
+ 147, 147, 147, nil, nil, nil, nil, nil, nil, nil,
266
+ nil, nil, 147, 147, 147, 147, 147, 147, 147, 147,
267
+ 147, 147, 147, 147, 147, 147, 147, 85, 85, 85,
268
+ nil, nil, nil, nil, nil, 85, nil, nil, nil, nil,
269
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
270
+ 85, 85, 85, 85, 117, 117, 117, nil, nil, nil,
271
+ nil, nil, nil, nil, nil, nil, nil, 117, 117, 117,
261
272
  117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
262
- 117, 117, 117, 27, 27, 27, nil, nil, nil, nil,
263
- nil, nil, nil, nil, nil, nil, 27, 27, 27, 27,
264
- 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
265
- 28, 28, 28, nil, nil, nil, nil, nil, nil, nil,
266
- nil, nil, nil, 28, 28, 28, 28, 28, 28, 28,
267
- 28, 28, 28, 28, 28, 28, 28, 29, 29, 29,
268
- nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
269
- 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
270
- 29, 29, 29, 29, 30, 30, 30, nil, nil, nil,
271
- nil, nil, nil, nil, nil, nil, nil, 30, 30, 30,
272
- 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
273
- 30, 25, 25, 25, nil, nil, nil, nil, nil, nil,
274
- nil, nil, nil, nil, 25, 25, 25, 25, 25, 25,
275
- 25, 25, 25, 25, 25, 25, 25, 25, 212, 212,
276
- 212, nil, nil, nil, nil, nil, nil, nil, nil, nil,
277
- nil, 212, 212, 212, 212, 212, 212, 212, 212, 212,
278
- 212, 212, 212, 212, 212, 122, 122, 122, nil, nil,
273
+ 117, 120, 120, 120, nil, nil, nil, nil, nil, nil,
274
+ nil, nil, nil, nil, 120, 120, 120, 120, 120, 120,
275
+ 120, 120, 120, 120, 120, 120, 120, 120, 121, 121,
276
+ 121, nil, nil, nil, nil, nil, nil, nil, nil, nil,
277
+ nil, 121, 121, 121, 121, 121, 121, 121, 121, 121,
278
+ 121, 121, 121, 121, 121, 122, 122, 122, nil, nil,
279
279
  nil, nil, nil, nil, nil, nil, nil, nil, 122, 122,
280
280
  122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
281
- 122, 122, 14, 14, 14, nil, nil, nil, nil, nil,
282
- nil, nil, nil, nil, nil, nil, 14, 14, 14, 14,
283
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 124,
284
- 124, 124, nil, nil, nil, nil, nil, nil, nil, nil,
285
- nil, nil, 124, 124, 124, 124, 124, 124, 124, 124,
286
- 124, 124, 124, 124, 124, 124, 8, 8, 8, nil,
287
- nil, nil, nil, nil, nil, nil, nil, nil, nil, 8,
288
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
289
- 8, 8, 8, 209, 209, 209, nil, nil, nil, nil,
290
- nil, 209, nil, nil, nil, nil, 209, 209, 209, 209,
281
+ 122, 122, 124, 124, 124, nil, nil, nil, nil, nil,
282
+ nil, nil, nil, nil, nil, 124, 124, 124, 124, 124,
283
+ 124, 124, 124, 124, 124, 124, 124, 124, 124, 125,
284
+ 125, 125, nil, nil, nil, nil, nil, nil, nil, nil,
285
+ nil, nil, 125, 125, 125, 125, 125, 125, 125, 125,
286
+ 125, 125, 125, 125, 125, 125, 78, 78, 78, nil,
287
+ 78, nil, nil, nil, nil, nil, nil, nil, nil, 78,
288
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
289
+ 78, 78, 78, 81, 81, 81, nil, nil, nil, nil,
290
+ nil, nil, nil, nil, nil, nil, 81, 81, 81, 81,
291
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
292
+ 26, 26, 26, nil, nil, nil, nil, nil, nil, nil,
293
+ nil, nil, nil, 26, 26, 26, 26, 26, 26, 26,
294
+ 26, 26, 26, 26, 26, 26, 26, 209, 209, 209,
295
+ nil, nil, nil, nil, nil, 209, nil, nil, nil, nil,
291
296
  209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
292
- 112, 112, 112, nil, nil, nil, nil, nil, 112, nil,
293
- nil, nil, nil, 112, 112, 112, 112, 112, 112, 112,
294
- 112, 112, 112, 112, 112, 112, 112, 205, 205, 205,
295
- nil, nil, nil, nil, nil, nil, nil, nil, nil, 205,
296
- 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
297
- 205, 205, 205, 205, 26, 26, 26, nil, nil, nil,
298
- nil, nil, nil, nil, nil, nil, nil, 26, 26, 26,
299
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
300
- 26, 125, 125, 125, nil, nil, nil, nil, nil, nil,
301
- nil, nil, nil, nil, 125, 125, 125, 125, 125, 125,
302
- 125, 125, 125, 125, 125, 125, 125, 125, 192, 192,
303
- 192, nil, nil, nil, nil, nil, 192, nil, nil, nil,
304
- nil, 192, 192, 192, 192, 192, 192, 192, 192, 192,
305
- 192, 192, 192, 192, 192, 188, 188, 188, nil, nil,
306
- nil, nil, nil, nil, nil, nil, nil, nil, 188, 188,
307
- 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
308
- 188, 188, 121, 121, 121, nil, nil, nil, nil, nil,
309
- nil, nil, nil, nil, nil, 121, 121, 121, 121, 121,
310
- 121, 121, 121, 121, 121, 121, 121, 121, 121, 70,
311
- 70, 70, nil, nil, nil, nil, nil, nil, nil, nil,
312
- nil, nil, 70, 70, 70, 70, 70, 70, 70, 70,
313
- 70, 70, 70, 70, 70, 70, 179, 179, 179, nil,
314
- nil, nil, nil, nil, nil, nil, nil, nil, 179, 179,
315
- 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
316
- 179, 179, 179, 104, 104, 104, nil, 104, nil, nil,
317
- nil, nil, nil, nil, nil, nil, 104, 104, 104, 104,
318
- 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
319
- 177, 177, 177, nil, nil, nil, nil, nil, nil, nil,
320
- nil, nil, nil, 177, 177, 177, 177, 177, 177, 177,
321
- 177, 177, 177, 177, 177, 177, 177, 77, 77, 77,
297
+ 209, 209, 209, 209, 212, 212, 212, nil, nil, nil,
298
+ nil, nil, nil, nil, nil, nil, nil, 212, 212, 212,
299
+ 212, 212, 212, 212, 212, 212, 212, 212, 212, 212,
300
+ 212, 27, 27, 27, nil, nil, nil, nil, nil, nil,
301
+ nil, nil, nil, nil, 27, 27, 27, 27, 27, 27,
302
+ 27, 27, 27, 27, 27, 27, 27, 27, 28, 28,
303
+ 28, nil, nil, nil, nil, nil, nil, nil, nil, nil,
304
+ nil, 28, 28, 28, 28, 28, 28, 28, 28, 28,
305
+ 28, 28, 28, 28, 28, 29, 29, 29, nil, nil,
306
+ nil, nil, nil, nil, nil, nil, nil, nil, 29, 29,
307
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
308
+ 29, 29, 30, 30, 30, nil, nil, nil, nil, nil,
309
+ nil, nil, nil, nil, nil, 30, 30, 30, 30, 30,
310
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 100,
311
+ 100, 100, nil, nil, nil, nil, nil, nil, nil, nil,
312
+ nil, nil, 100, 100, 100, 100, 100, 100, 100, 100,
313
+ 100, 100, 100, 100, 100, 100, 70, 70, 70, nil,
314
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 70,
315
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
316
+ 70, 70, 70, 8, 8, 8, nil, nil, nil, nil,
317
+ nil, nil, nil, nil, nil, nil, 8, 8, 8, 8,
318
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
319
+ 104, 104, 104, nil, 104, nil, nil, nil, nil, nil,
320
+ nil, nil, nil, 104, 104, 104, 104, 104, 104, 104,
321
+ 104, 104, 104, 104, 104, 104, 104, 14, 14, 14,
322
322
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
323
- 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
324
- 77, 77, 77, 77, 78, 78, 78, nil, 78, nil,
325
- nil, nil, nil, nil, nil, nil, nil, 78, 78, 78,
326
- 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
327
- 78, 163, 163, 163, nil, nil, nil, nil, nil, 163,
328
- nil, nil, nil, nil, 163, 163, 163, 163, 163, 163,
329
- 163, 163, 163, 163, 163, 163, 163, 163, 81, 81,
330
- 81, nil, nil, nil, nil, nil, nil, nil, nil, nil,
331
- nil, 81, 81, 81, 81, 81, 81, 81, 81, 81,
332
- 81, 81, 81, 81, 81, 162, 162, 162, nil, nil,
333
- nil, nil, nil, nil, nil, nil, nil, nil, 162, 162,
334
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
335
- 162, 162, 83, 83, 83, nil, nil, nil, nil, nil,
336
- 83, nil, nil, nil, nil, 83, 83, 83, 83, 83,
337
- 83, 83, 83, 83, 83, 83, 83, 83, 83, 161,
338
- 161, 161, nil, 161, nil, nil, nil, nil, nil, nil,
339
- nil, nil, 161, 161, 161, 161, 161, 161, 161, 161,
340
- 161, 161, 161, 161, 161, 161, 85, 85, 85, nil,
341
- nil, nil, nil, nil, 85, nil, nil, nil, nil, 85,
342
- 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
343
- 85, 85, 85, 120, 120, 120, nil, nil, nil, nil,
344
- nil, nil, nil, nil, nil, nil, 120, 120, 120, 120,
345
- 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
346
- 160, 160, 160, nil, nil, nil, nil, nil, nil, nil,
347
- nil, nil, 160, 160, 160, 160, 160, 160, 160, 160,
348
- 160, 160, 160, 160, 160, 160, 160, 100, 100, 100,
323
+ nil, 14, 14, 14, 14, 14, 14, 14, 14, 14,
324
+ 14, 14, 14, 14, 112, 112, 112, nil, nil, nil,
325
+ nil, nil, 112, nil, nil, nil, nil, 112, 112, 112,
326
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
327
+ 112, 77, 77, 77, nil, nil, nil, nil, nil, nil,
328
+ nil, nil, nil, nil, 77, 77, 77, 77, 77, 77,
329
+ 77, 77, 77, 77, 77, 77, 77, 77, 160, 160,
330
+ 160, nil, nil, nil, nil, nil, nil, nil, nil, nil,
331
+ 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
332
+ 160, 160, 160, 160, 160, 161, 161, 161, nil, 161,
333
+ nil, nil, nil, nil, nil, nil, nil, nil, 161, 161,
334
+ 161, 161, 161, 161, 161, 161, 161, 161, 161, 161,
335
+ 161, 161, 162, 162, 162, nil, nil, nil, nil, nil,
336
+ nil, nil, nil, nil, nil, 162, 162, 162, 162, 162,
337
+ 162, 162, 162, 162, 162, 162, 162, 162, 162, 163,
338
+ 163, 163, nil, nil, nil, nil, nil, 163, nil, nil,
339
+ nil, nil, 163, 163, 163, 163, 163, 163, 163, 163,
340
+ 163, 163, 163, 163, 163, 163, 177, 177, 177, nil,
341
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 177,
342
+ 177, 177, 177, 177, 177, 177, 177, 177, 177, 177,
343
+ 177, 177, 177, 179, 179, 179, nil, nil, nil, nil,
344
+ nil, nil, nil, nil, nil, 179, 179, 179, 179, 179,
345
+ 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
346
+ 184, 184, 184, nil, nil, nil, nil, nil, nil, nil,
347
+ nil, nil, 184, 184, 184, 184, 184, 184, 184, 184,
348
+ 184, 184, 184, 184, 184, 184, 184, 91, 91, 91,
349
349
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
350
- 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
351
- 100, 100, 100, 100, 91, 91, 91, nil, nil, nil,
352
- nil, nil, nil, nil, nil, nil, nil, 91, 91, 91,
353
350
  91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
354
- 91, 147, 147, 147, nil, nil, nil, nil, nil, nil,
355
- nil, nil, nil, 147, 147, 147, 147, 147, 147, 147,
356
- 147, 147, 147, 147, 147, 147, 147, 147, 143, 143,
357
- 143, nil, nil, nil, nil, nil, nil, nil, nil, nil,
358
- nil, 143, 143, 143, 143, 143, 143, 143, 143, 143,
359
- 143, 143, 143, 143, 143, 184, 184, 184, nil, nil,
360
- nil, nil, nil, nil, nil, nil, nil, 184, 184, 184,
361
- 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
362
- 184, 184, 157, 157, 157, nil, nil, nil, nil, nil,
351
+ 91, 91, 91, 91, 188, 188, 188, nil, nil, nil,
352
+ nil, nil, nil, nil, nil, nil, nil, 188, 188, 188,
353
+ 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
354
+ 188, 192, 192, 192, nil, nil, nil, nil, nil, 192,
355
+ nil, nil, nil, nil, 192, 192, 192, 192, 192, 192,
356
+ 192, 192, 192, 192, 192, 192, 192, 192, 25, 25,
357
+ 25, nil, nil, nil, nil, nil, nil, nil, nil, nil,
358
+ nil, 25, 25, 25, 25, 25, 25, 25, 25, 25,
359
+ 25, 25, 25, 25, 25, 205, 205, 205, nil, nil,
360
+ nil, nil, nil, nil, nil, nil, nil, 205, 205, 205,
361
+ 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
362
+ 205, 205, 0, 0, 0, nil, nil, 86, 86, 86,
363
+ nil, nil, nil, 0, nil, nil, 0, 0, 0, 86,
364
+ 0, 0, 0, 0, 0, nil, 0, 123, 123, 123,
365
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
366
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
367
+ 123, 123, 157, 157, 157, nil, nil, nil, nil, nil,
363
368
  nil, nil, nil, nil, 157, 157, 157, 157, 157, 157,
364
369
  157, 157, 157, 157, 157, 157, 157, 3, 3, 3,
365
- nil, nil, 86, 86, 86, nil, nil, nil, 3, nil,
366
- nil, 3, 3, 3, 86, 3, 3, 3, 3, 3,
367
- nil, 3, 123, 123, 123, nil, nil, nil, nil, nil,
368
- nil, nil, nil, nil, nil, 123, 123, 123, 123, 123,
369
- 123, 123, 123, 123, 123, 123, 123, 0, 0, 0,
370
- nil, nil, nil, nil, nil, nil, nil, nil, 0, nil,
371
- nil, 0, 0, 0, nil, 0, 0, 0, 0, 0,
372
- nil, 0 ]
370
+ nil, nil, nil, nil, nil, nil, nil, nil, 3, nil,
371
+ nil, 3, 3, 3, nil, 3, 3, 3, 3, 3,
372
+ nil, 3 ]
373
373
 
374
374
  racc_action_pointer = [
375
- 1335, 243, nil, 1285, nil, nil, nil, nil, 504, nil,
376
- nil, nil, nil, -2, 450, nil, nil, nil, 229, nil,
377
- nil, nil, nil, nil, nil, 369, 612, 261, 288, 315,
378
- 342, 208, 240, nil, 234, nil, nil, nil, nil, nil,
375
+ 1260, 11, nil, 1335, nil, nil, nil, nil, 801, nil,
376
+ nil, nil, nil, -2, 855, nil, nil, nil, 23, nil,
377
+ nil, nil, nil, nil, nil, 1206, 558, 639, 666, 693,
378
+ 720, 24, 64, nil, 60, nil, nil, nil, nil, nil,
379
379
  nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
380
380
  nil, nil, nil, nil, 25, nil, nil, nil, nil, 0,
381
- 52, 202, nil, 58, 181, 193, 178, 175, 153, 150,
382
- 747, nil, 148, 173, nil, nil, 145, 855, 882, 122,
383
- nil, 936, 120, 990, 139, 1044, 1290, nil, 142, nil,
384
- 114, 1152, 109, 106, 102, 78, 61, 51, -3, nil,
385
- 1125, 45, 52, nil, 801, nil, 28, nil, 6, nil,
386
- nil, -3, 558, nil, -2, nil, nil, 234, 133, nil,
387
- 1071, 720, 423, 1310, 477, 639, 69, nil, nil, nil,
388
- 79, nil, nil, 55, nil, nil, 141, nil, nil, 80,
389
- 54, 103, nil, 1206, nil, 114, nil, 1179, nil, 89,
390
- nil, nil, nil, nil, nil, -23, nil, 1260, 141, nil,
391
- 1098, 1017, 963, 909, 164, nil, nil, nil, nil, nil,
392
- nil, nil, nil, nil, nil, nil, nil, 828, 110, 774,
393
- nil, nil, nil, nil, 1233, 176, nil, nil, 693, nil,
394
- nil, nil, 666, nil, nil, nil, 174, nil, 26, nil,
395
- nil, nil, 79, nil, nil, 585, nil, 207, nil, 531,
396
- nil, 25, 396, nil, 203, nil, nil, nil, nil, 172,
397
- 0, 211, nil, nil, nil, nil, nil ]
381
+ 52, 51, nil, 59, 51, 68, 55, 58, 60, 82,
382
+ 774, nil, 83, 111, nil, nil, 86, 909, 504, 88,
383
+ nil, 531, 89, 234, 111, 315, 1265, nil, 138, nil,
384
+ 114, 1125, 136, 138, 140, 142, 172, 165, -3, nil,
385
+ 747, 167, 176, nil, 828, nil, 175, nil, 179, nil,
386
+ nil, -3, 882, nil, -2, nil, nil, 342, 173, nil,
387
+ 369, 396, 423, 1285, 450, 477, 193, nil, nil, nil,
388
+ 201, nil, nil, 178, nil, nil, 172, nil, nil, 199,
389
+ 49, 201, nil, 261, nil, 210, nil, 288, nil, 182,
390
+ nil, nil, nil, nil, nil, 206, nil, 1310, 232, nil,
391
+ 936, 963, 990, 1017, 228, nil, nil, nil, nil, nil,
392
+ nil, nil, nil, nil, nil, nil, nil, 1044, 141, 1071,
393
+ nil, nil, nil, nil, 1098, 234, nil, nil, 1152, nil,
394
+ nil, nil, 1179, nil, nil, nil, 208, nil, 25, nil,
395
+ nil, nil, 79, nil, nil, 1233, nil, 237, nil, 585,
396
+ nil, 26, 612, nil, 110, nil, nil, nil, nil, 203,
397
+ 0, -23, nil, nil, nil, nil, nil ]
398
398
 
399
399
  racc_action_default = [
400
400
  -136, -136, -1, -2, -3, -5, -6, -7, -13, -9,
@@ -423,16 +423,16 @@ racc_action_default = [
423
423
 
424
424
  racc_goto_table = [
425
425
  8, 62, 111, 8, 114, 154, 132, 55, 35, 165,
426
- 126, 155, 76, 59, 87, 186, 193, 193, 154, 113,
427
- 213, 1, 147, 156, 99, 64, 65, 66, 67, 68,
428
- 69, 140, 127, 221, 84, 104, 131, 116, 89, 154,
429
- 92, 93, 94, 95, 184, 155, 97, 82, 75, 129,
430
- 101, 203, 186, 105, 59, 133, 109, 190, 120, 185,
431
- 154, 137, 4, 88, 118, 33, 202, 206, 205, 199,
432
- 96, 160, 161, 157, 181, 216, 183, 102, 106, 135,
433
- 107, 108, 198, 61, 154, 139, 88, 223, 141, 86,
434
- 54, 119, 224, 218, 90, 98, 154, 72, 34, 131,
435
- 130, 154, 3, 2, 106, 149, 196, 164, nil, nil,
426
+ 126, 156, 76, 59, 87, 186, 160, 161, 154, 113,
427
+ 213, 196, 147, 155, 99, 64, 65, 66, 67, 68,
428
+ 69, 140, 127, 221, 84, 2, 131, 116, 89, 154,
429
+ 92, 93, 94, 95, 184, 190, 97, 82, 75, 129,
430
+ 101, 203, 186, 105, 59, 133, 109, 155, 3, 185,
431
+ 154, 137, 4, 88, 118, 33, 34, 206, 72, 199,
432
+ 96, 193, 193, 98, 181, 216, 183, 102, 106, 135,
433
+ 54, 108, 198, 120, 154, 139, 88, 223, 141, 157,
434
+ 104, 119, 224, 218, 202, 205, 154, 107, 61, 131,
435
+ 130, 154, 86, 90, 106, 149, 1, 164, nil, nil,
436
436
  nil, 211, nil, nil, nil, nil, nil, 142, nil, nil,
437
437
  144, 145, 148, 153, 158, 158, nil, nil, 220, 189,
438
438
  nil, nil, nil, nil, nil, nil, 153, nil, nil, nil,
@@ -447,16 +447,16 @@ racc_goto_table = [
447
447
 
448
448
  racc_goto_check = [
449
449
  8, 26, 16, 8, 16, 27, 20, 21, 13, 18,
450
- 60, 28, 25, 13, 49, 61, 58, 58, 27, 12,
451
- 17, 1, 57, 30, 15, 13, 13, 13, 13, 13,
452
- 13, 16, 12, 17, 11, 32, 12, 49, 11, 27,
453
- 11, 11, 11, 11, 57, 28, 11, 26, 21, 15,
454
- 11, 18, 61, 33, 13, 25, 11, 30, 29, 60,
455
- 27, 25, 4, 8, 11, 4, 39, 41, 40, 20,
456
- 13, 59, 59, 31, 12, 18, 12, 13, 13, 33,
457
- 43, 13, 16, 44, 27, 11, 8, 18, 11, 48,
458
- 19, 13, 18, 41, 56, 14, 27, 10, 9, 12,
459
- 13, 27, 3, 2, 13, 62, 63, 11, nil, nil,
450
+ 60, 30, 25, 13, 49, 61, 59, 59, 27, 12,
451
+ 17, 63, 57, 28, 15, 13, 13, 13, 13, 13,
452
+ 13, 16, 12, 17, 11, 2, 12, 49, 11, 27,
453
+ 11, 11, 11, 11, 57, 30, 11, 26, 21, 15,
454
+ 11, 18, 61, 33, 13, 25, 11, 28, 3, 60,
455
+ 27, 25, 4, 8, 11, 4, 9, 41, 10, 20,
456
+ 13, 58, 58, 14, 12, 18, 12, 13, 13, 33,
457
+ 19, 13, 16, 29, 27, 11, 8, 18, 11, 31,
458
+ 32, 13, 18, 41, 39, 40, 27, 43, 44, 12,
459
+ 13, 27, 48, 56, 13, 62, 1, 11, nil, nil,
460
460
  nil, 16, nil, nil, nil, nil, nil, 13, nil, nil,
461
461
  13, 13, 13, 8, 13, 13, nil, nil, 16, 11,
462
462
  nil, nil, nil, nil, nil, nil, 8, nil, nil, nil,
@@ -470,13 +470,13 @@ racc_goto_check = [
470
470
  nil, nil, 13, nil, 8, nil, nil, nil, nil, 8 ]
471
471
 
472
472
  racc_goto_pointer = [
473
- nil, 21, 103, 102, 62, nil, nil, nil, 0, 90,
474
- 63, -26, -65, 0, 22, -49, -81, -178, -127, 77,
475
- -95, -6, nil, nil, nil, -47, -13, -118, -112, -33,
476
- -100, -50, -43, -25, nil, nil, nil, nil, nil, -112,
477
- -111, -112, nil, 1, 69, nil, nil, nil, 26, -49,
478
- nil, nil, nil, nil, nil, nil, 29, -99, -144, -53,
479
- -86, -132, -17, -56 ]
473
+ nil, 106, 35, 58, 62, nil, nil, nil, 0, 58,
474
+ 34, -26, -65, 0, 0, -49, -81, -178, -127, 67,
475
+ -95, -6, nil, nil, nil, -47, -13, -118, -100, -8,
476
+ -112, -34, 12, -25, nil, nil, nil, nil, nil, -84,
477
+ -84, -112, nil, 18, 84, nil, nil, nil, 39, -49,
478
+ nil, nil, nil, nil, nil, nil, 38, -99, -89, -108,
479
+ -86, -132, -17, -141 ]
480
480
 
481
481
  racc_goto_default = [
482
482
  nil, nil, nil, nil, nil, 5, 6, 7, 51, nil,
@@ -56,7 +56,11 @@ module GraphQL
56
56
  @operation_name = operation_name
57
57
  @fragments = {}
58
58
  @operations = {}
59
- @provided_variables = variables
59
+ if variables.is_a?(String)
60
+ raise ArgumentError, "Query variables should be a Hash, not a String. Try JSON.parse to prepare variables."
61
+ else
62
+ @provided_variables = variables
63
+ end
60
64
  @query_string = query_string
61
65
  @document = document || GraphQL.parse(query_string)
62
66
  @document.definitions.each do |part|
@@ -46,8 +46,6 @@ module GraphQL
46
46
  # end
47
47
  #
48
48
  class Schema
49
- include BuildFromDefinition
50
-
51
49
  include GraphQL::Define::InstanceDefinable
52
50
  accepts_definitions \
53
51
  :query, :mutation, :subscription,
@@ -270,6 +268,16 @@ module GraphQL
270
268
  GraphQL::Schema::Loader.load(introspection_result)
271
269
  end
272
270
 
271
+ # Create schema from an IDL schema.
272
+ # @param definition_string String A schema definition string
273
+ # @return [GraphQL::Schema] the schema described by `document`
274
+ def self.from_definition(definition_string)
275
+ GraphQL::Schema::BuildFromDefinition.from_definition(definition_string)
276
+ end
277
+
278
+ # Error that is raised when [#Schema#from_definition] is passed an invalid schema definition string.
279
+ class InvalidDocumentError < Error; end;
280
+
273
281
  private
274
282
 
275
283
  # Lazily create a middleware and add it to the schema
@@ -1,16 +1,7 @@
1
1
  module GraphQL
2
2
  class Schema
3
3
  module BuildFromDefinition
4
- def self.included(base)
5
- base.extend(ClassMethods)
6
- end
7
-
8
- class InvalidDocumentError < Error; end;
9
-
10
- module ClassMethods
11
- # Create schema from an IDL schema.
12
- # @param definition_string String A schema definition string
13
- # @return [GraphQL::Schema] the schema described by `document`
4
+ class << self
14
5
  def from_definition(definition_string)
15
6
  document = GraphQL::parse(definition_string)
16
7
  Builder.build(document)
@@ -17,8 +17,6 @@ module GraphQL
17
17
  return
18
18
  end
19
19
  end
20
- elsif context.skip_field?(parent.name)
21
- return
22
20
  elsif parent.is_a?(GraphQL::Language::Nodes::Directive)
23
21
  parent_defn = context.schema.directives[parent.name]
24
22
  else
@@ -6,7 +6,6 @@ module GraphQL
6
6
  def validate(context)
7
7
  visitor = context.visitor
8
8
  visitor[GraphQL::Language::Nodes::Field] << ->(node, parent) {
9
- return if context.skip_field?(node.name)
10
9
  parent_type = context.object_types[-2]
11
10
  parent_type = parent_type.unwrap
12
11
  validate_field(context, node, parent_type, parent)
@@ -16,7 +15,7 @@ module GraphQL
16
15
  private
17
16
 
18
17
  def validate_field(context, ast_field, parent_type, parent)
19
- if parent_type.kind.union?
18
+ if parent_type.kind.union? && ast_field.name != '__typename'
20
19
  context.errors << message("Selections can't be made directly on unions (see selections on #{parent_type.name})", parent, context: context)
21
20
  return GraphQL::Language::Visitor::SKIP
22
21
  end
@@ -7,7 +7,6 @@ module GraphQL
7
7
 
8
8
  def validate(context)
9
9
  context.visitor[GraphQL::Language::Nodes::Field] << ->(node, parent) {
10
- return if context.skip_field?(node.name)
11
10
  field_defn = context.field_definition
12
11
  validate_field_selections(node, field_defn, context)
13
12
  }
@@ -17,7 +17,6 @@ module GraphQL
17
17
  end
18
18
 
19
19
  def validate_field(ast_field, context)
20
- return if context.skip_field?(ast_field.name)
21
20
  defn = context.field_definition
22
21
  assert_required_args(ast_field, defn, context)
23
22
  end
@@ -74,12 +74,6 @@ module GraphQL
74
74
  @literal_validator ||= LiteralValidator.new(warden: @warden)
75
75
  @literal_validator.validate(ast_value, type)
76
76
  end
77
-
78
- # Don't try to validate dynamic fields
79
- # since they aren't defined by the type system
80
- def skip_field?(field_name)
81
- GraphQL::Schema::DYNAMIC_FIELDS.include?(field_name)
82
- end
83
77
  end
84
78
  end
85
79
  end
@@ -1,3 +1,3 @@
1
1
  module GraphQL
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
data/readme.md CHANGED
@@ -55,9 +55,6 @@ See "Getting Started" on the [website](https://rmosolgo.github.io/graphql-ruby/)
55
55
  - Improve API for creating edges (better RANGE_ADD support)
56
56
  - If the new edge isn't a member of the connection's objects, raise a nice error
57
57
  - `args` should whitelist keys -- if you request a key that isn't defined for the field, it should 💥
58
- - Fix middleware ([discussion](https://github.com/rmosolgo/graphql-ruby/issues/186))
59
- - Handle out-of-bounds lookup, eg `graphql-batch`
60
- - Handle non-serial execution, eg `@defer`
61
58
  - Support non-instance-eval `.define`, eg `.define { |defn| ... }`
62
59
  - First-class promise support ([discussion](https://github.com/rmosolgo/graphql-ruby/issues/274))
63
60
  - like `graphql-batch` but more local
@@ -67,5 +64,3 @@ See "Getting Started" on the [website](https://rmosolgo.github.io/graphql-ruby/)
67
64
  - Adding fields to selections (`__typename` can go anywhere, others are type-specific)
68
65
  - Renaming fragments from local names to unique names
69
66
  - Document encrypted & versioned cursors
70
- - Make it faster
71
- - Is it possible to merge typed branches before resolving them? It's hard because even the branches will have branches.
@@ -315,6 +315,13 @@ describe GraphQL::Query do
315
315
  end
316
316
  end
317
317
 
318
+ describe "when they're a string" do
319
+ let(:query_variables) { '{ "var" : 1 }' }
320
+ it "raises an error" do
321
+ assert_raises(ArgumentError) { result }
322
+ end
323
+ end
324
+
318
325
  describe "default values" do
319
326
  let(:query_string) {%|
320
327
  query getCheese($cheeseId: Int = 3){
@@ -187,4 +187,20 @@ describe GraphQL::StaticValidation::ArgumentLiteralsAreCompatible do
187
187
  end
188
188
  end
189
189
  end
190
+
191
+ describe "dynamic fields" do
192
+ let(:query_string) {"
193
+ query {
194
+ __type(name: 1) { name }
195
+ }
196
+ "}
197
+
198
+ it "finds invalid argument types" do
199
+ assert_includes(errors, {
200
+ "message"=>"Argument 'name' on Field '__type' has an invalid value. Expected type 'String!'.",
201
+ "locations"=>[{"line"=>3, "column"=>9}],
202
+ "fields"=>["query", "__type", "name"],
203
+ })
204
+ end
205
+ end
190
206
  end
@@ -49,4 +49,20 @@ describe GraphQL::StaticValidation::ArgumentsAreDefined do
49
49
  }
50
50
  assert_includes(errors, directive_error)
51
51
  end
52
+
53
+ describe "dynamic fields" do
54
+ let(:query_string) {"
55
+ query {
56
+ __type(somethingInvalid: 1) { name }
57
+ }
58
+ "}
59
+
60
+ it "finds undefined arguments" do
61
+ assert_includes(errors, {
62
+ "message"=>"Field '__type' doesn't accept argument 'somethingInvalid'",
63
+ "locations"=>[{"line"=>3, "column"=>9}],
64
+ "fields"=>["query", "__type", "somethingInvalid"],
65
+ })
66
+ end
67
+ end
52
68
  end
@@ -59,7 +59,6 @@ describe GraphQL::StaticValidation::FieldsAreDefinedOnType do
59
59
  fragment dpIndirectFields on DairyProduct { ... on Cheese { source } }
60
60
  "}
61
61
 
62
-
63
62
  it "doesnt allow selections on unions" do
64
63
  expected_errors = [
65
64
  {
@@ -73,4 +72,90 @@ describe GraphQL::StaticValidation::FieldsAreDefinedOnType do
73
72
  assert_equal(expected_errors, errors)
74
73
  end
75
74
  end
75
+
76
+ describe "__typename" do
77
+ describe "on existing unions" do
78
+ let(:query_string) { "
79
+ query { favoriteEdible { ...dpFields } }
80
+ fragment dpFields on DairyProduct { __typename }
81
+ "}
82
+
83
+ it "is allowed" do
84
+ assert_equal([], errors)
85
+ end
86
+ end
87
+
88
+ describe "on existing objects" do
89
+ let(:query_string) { "
90
+ query { cheese(id: 1) { __typename } }
91
+ "}
92
+
93
+ it "is allowed" do
94
+ assert_equal([], errors)
95
+ end
96
+ end
97
+ end
98
+
99
+ describe "__schema" do
100
+ describe "on query root" do
101
+ let(:query_string) { "
102
+ query { __schema { queryType { name } } }
103
+ "}
104
+
105
+ it "is allowed" do
106
+ assert_equal([], errors)
107
+ end
108
+ end
109
+
110
+ describe "on non-query root" do
111
+ let(:query_string) { "
112
+ query { cheese(id: 1) { __schema { queryType { name } } } }
113
+ "}
114
+
115
+ it "is not allowed" do
116
+ expected_errors = [
117
+ {
118
+ "message"=>"Field '__schema' doesn't exist on type 'Cheese'",
119
+ "locations"=>[
120
+ {"line"=>2, "column"=>33}
121
+ ],
122
+ "fields"=>["query", "cheese", "__schema"],
123
+ }
124
+ ]
125
+ assert_equal(expected_errors, errors)
126
+ end
127
+ end
128
+ end
129
+
130
+ describe "__type" do
131
+ describe "on query root" do
132
+ let(:query_string) { %|
133
+ query { __type(name: "Cheese") { name } }
134
+ |}
135
+
136
+ it "is allowed" do
137
+ assert_equal([], errors)
138
+ end
139
+ end
140
+
141
+ describe "on non-query root" do
142
+ let(:query_string) { %|
143
+ query { cheese(id: 1) { __type(name: "Cheese") { name } } }
144
+ |}
145
+
146
+ it "is not allowed" do
147
+ expected_errors = [
148
+ {
149
+ "message"=>"Field '__type' doesn't exist on type 'Cheese'",
150
+ "locations"=>[
151
+ {"line"=>2, "column"=>33}
152
+ ],
153
+ "fields"=>["query", "cheese", "__type"],
154
+ }
155
+ ]
156
+ assert_equal(expected_errors, errors)
157
+ end
158
+ end
159
+ end
160
+
76
161
  end
@@ -39,4 +39,25 @@ describe GraphQL::StaticValidation::RequiredArgumentsArePresent do
39
39
  }
40
40
  assert_includes(errors, directive_error)
41
41
  end
42
+
43
+ describe "dynamic fields" do
44
+ let(:query_string) {"
45
+ query {
46
+ __type { name }
47
+ }
48
+ "}
49
+
50
+ it "finds undefined required arguments" do
51
+ expected_errors = [
52
+ {
53
+ "message"=>"Field '__type' is missing required arguments: name",
54
+ "locations"=>[
55
+ {"line"=>3, "column"=>9}
56
+ ],
57
+ "fields"=>["query", "__type"],
58
+ }
59
+ ]
60
+ assert_equal(expected_errors, errors)
61
+ end
62
+ end
42
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-07 00:00:00.000000000 Z
11
+ date: 2016-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codeclimate-test-reporter