graphql 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/graphql/language/lexer.rb +234 -152
- data/lib/graphql/language/lexer.rl +6 -0
- data/lib/graphql/language/parser.rb +343 -300
- data/lib/graphql/language/parser.y +9 -1
- data/lib/graphql/query/executor.rb +2 -2
- data/lib/graphql/schema.rb +26 -0
- data/lib/graphql/static_validation/type_stack.rb +1 -1
- data/lib/graphql/version.rb +1 -1
- data/readme.md +1 -0
- metadata +2 -2
@@ -14,6 +14,9 @@
|
|
14
14
|
TRUE = 'true';
|
15
15
|
FALSE = 'false';
|
16
16
|
NULL = 'null';
|
17
|
+
QUERY = 'query';
|
18
|
+
MUTATION = 'mutation';
|
19
|
+
SUBSCRIPTION = 'subscription';
|
17
20
|
RCURLY = '{';
|
18
21
|
LCURLY = '}';
|
19
22
|
RPAREN = '(';
|
@@ -43,6 +46,9 @@
|
|
43
46
|
TRUE => { emit_token.call(:TRUE) };
|
44
47
|
FALSE => { emit_token.call(:FALSE) };
|
45
48
|
NULL => { emit_token.call(:NULL) };
|
49
|
+
QUERY => { emit_token.call(:QUERY) };
|
50
|
+
MUTATION => { emit_token.call(:MUTATION) };
|
51
|
+
SUBSCRIPTION => { emit_token.call(:SUBSCRIPTION) };
|
46
52
|
RCURLY => { emit_token.call(:RCURLY) };
|
47
53
|
LCURLY => { emit_token.call(:LCURLY) };
|
48
54
|
RPAREN => { emit_token.call(:RPAREN) };
|
@@ -12,7 +12,7 @@ module GraphQL
|
|
12
12
|
module Language
|
13
13
|
class Parser < Racc::Parser
|
14
14
|
|
15
|
-
module_eval(<<'...end parser.y/module_eval...', 'parser.y',
|
15
|
+
module_eval(<<'...end parser.y/module_eval...', 'parser.y', 222)
|
16
16
|
|
17
17
|
def initialize(query_string)
|
18
18
|
@query_string = query_string
|
@@ -75,217 +75,244 @@ end
|
|
75
75
|
##### State transition tables begin ###
|
76
76
|
|
77
77
|
racc_action_table = [
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
78
|
+
24, 25, 26, 43, 111, 46, 42, 112, 14, 24,
|
79
|
+
25, 26, 39, 19, 20, 21, 22, 23, 24, 25,
|
80
|
+
26, 36, 34, 20, 21, 22, 23, 111, 38, 120,
|
81
|
+
27, 19, 20, 21, 22, 23, 24, 25, 26, 50,
|
82
|
+
34, 68, 54, 46, 54, 46, 24, 25, 26, 48,
|
83
|
+
20, 21, 22, 23, 24, 25, 26, 46, 57, 19,
|
84
|
+
20, 21, 22, 23, 24, 25, 26, 19, 20, 21,
|
85
|
+
22, 23, 24, 25, 26, 46, 74, 19, 20, 21,
|
86
|
+
22, 23, 24, 25, 26, 19, 20, 21, 22, 23,
|
87
|
+
24, 25, 26, 46, 12, 19, 20, 21, 22, 23,
|
88
|
+
24, 25, 26, 19, 20, 21, 22, 23, 100, 24,
|
89
|
+
25, 26, 12, 19, 20, 21, 22, 23, 24, 25,
|
90
|
+
26, 12, 19, 20, 21, 22, 23, 43, 76, 43,
|
91
|
+
106, 19, 20, 21, 22, 23, 24, 25, 26, 46,
|
92
|
+
80, 46, 12, 12, 100, 24, 25, 26, 12, 19,
|
93
|
+
20, 21, 22, 23, 24, 25, 26, 116, 19, 20,
|
94
|
+
21, 22, 23, 24, 25, 26, 118, 19, 20, 21,
|
95
|
+
22, 23, 9, 10, 11, nil, 19, 20, 21, 22,
|
96
|
+
23, nil, 92, 12, nil, 93, nil, 13, 94, nil,
|
97
|
+
nil, 95, nil, 86, 87, 83, 84, 85, 92, nil,
|
98
|
+
nil, 93, 103, nil, 94, nil, nil, 95, nil, 86,
|
99
|
+
87, 83, 84, 85, 92, nil, nil, 93, nil, nil,
|
100
|
+
94, nil, nil, 95, nil, 86, 87, 83, 84, 85,
|
101
|
+
92, nil, nil, 93, 114, nil, 94, nil, nil, 95,
|
102
|
+
nil, 86, 87, 83, 84, 85, 9, 10, 11, nil,
|
103
|
+
nil, nil, nil, 92, nil, nil, 93, 12, nil, 94,
|
104
|
+
nil, 13, 95, nil, 86, 87, 83, 84, 85 ]
|
98
105
|
|
99
106
|
racc_action_check = [
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
107
|
+
28, 28, 28, 33, 98, 64, 33, 98, 1, 50,
|
108
|
+
50, 50, 28, 28, 28, 28, 28, 28, 12, 12,
|
109
|
+
12, 14, 28, 50, 50, 50, 50, 113, 16, 113,
|
110
|
+
12, 12, 12, 12, 12, 12, 34, 34, 34, 35,
|
111
|
+
12, 52, 52, 37, 38, 41, 46, 46, 46, 34,
|
112
|
+
34, 34, 34, 34, 43, 43, 43, 34, 43, 46,
|
113
|
+
46, 46, 46, 46, 7, 7, 7, 43, 43, 43,
|
114
|
+
43, 43, 58, 58, 58, 44, 58, 7, 7, 7,
|
115
|
+
7, 7, 42, 42, 42, 58, 58, 58, 58, 58,
|
116
|
+
48, 48, 48, 47, 49, 42, 42, 42, 42, 42,
|
117
|
+
80, 80, 80, 48, 48, 48, 48, 48, 80, 92,
|
118
|
+
92, 92, 51, 80, 80, 80, 80, 80, 94, 94,
|
119
|
+
94, 55, 92, 92, 92, 92, 92, 56, 60, 62,
|
120
|
+
94, 94, 94, 94, 94, 94, 100, 100, 100, 66,
|
121
|
+
70, 73, 78, 79, 100, 107, 107, 107, 81, 100,
|
122
|
+
100, 100, 100, 100, 54, 54, 54, 107, 107, 107,
|
123
|
+
107, 107, 107, 13, 13, 13, 109, 54, 54, 54,
|
124
|
+
54, 54, 0, 0, 0, nil, 13, 13, 13, 13,
|
125
|
+
13, nil, 76, 0, nil, 76, nil, 0, 76, nil,
|
126
|
+
nil, 76, nil, 76, 76, 76, 76, 76, 93, nil,
|
127
|
+
nil, 93, 93, nil, 93, nil, nil, 93, nil, 93,
|
128
|
+
93, 93, 93, 93, 118, nil, nil, 118, nil, nil,
|
129
|
+
118, nil, nil, 118, nil, 118, 118, 118, 118, 118,
|
130
|
+
104, nil, nil, 104, 104, nil, 104, nil, nil, 104,
|
131
|
+
nil, 104, 104, 104, 104, 104, 3, 3, 3, nil,
|
132
|
+
nil, nil, nil, 112, nil, nil, 112, 3, nil, 112,
|
133
|
+
nil, 3, 112, nil, 112, 112, 112, 112, 112 ]
|
120
134
|
|
121
135
|
racc_action_pointer = [
|
122
|
-
|
123
|
-
nil, nil,
|
124
|
-
nil, nil,
|
125
|
-
nil,
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
nil, nil,
|
132
|
-
nil,
|
133
|
-
nil, nil,
|
136
|
+
170, 8, nil, 244, nil, nil, nil, 62, nil, nil,
|
137
|
+
nil, nil, 16, 161, 21, nil, 23, nil, nil, nil,
|
138
|
+
nil, nil, nil, nil, nil, nil, nil, nil, -2, nil,
|
139
|
+
nil, nil, nil, -2, 34, 24, nil, 20, 37, nil,
|
140
|
+
nil, 22, 80, 52, 52, nil, 44, 70, 88, 81,
|
141
|
+
7, 99, 35, nil, 152, 108, 122, nil, 70, nil,
|
142
|
+
120, nil, 124, nil, -18, nil, 116, nil, nil, nil,
|
143
|
+
132, nil, nil, 118, nil, nil, 175, nil, 129, 130,
|
144
|
+
98, 135, nil, nil, nil, nil, nil, nil, nil, nil,
|
145
|
+
nil, nil, 107, 191, 116, nil, nil, nil, -5, nil,
|
146
|
+
134, nil, nil, nil, 223, nil, nil, 143, nil, 158,
|
147
|
+
nil, nil, 246, 18, nil, nil, nil, nil, 207, nil,
|
148
|
+
nil, nil ]
|
134
149
|
|
135
150
|
racc_action_default = [
|
136
|
-
-
|
137
|
-
-
|
138
|
-
-
|
139
|
-
|
140
|
-
-
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
144
|
-
-
|
145
|
-
-
|
146
|
-
-
|
147
|
-
-
|
151
|
+
-79, -79, -1, -2, -3, -5, -6, -12, -8, -9,
|
152
|
+
-10, -11, -79, -79, -79, -4, -14, -13, -35, -36,
|
153
|
+
-37, -38, -39, -40, -41, -42, -43, -24, -79, -28,
|
154
|
+
-30, -31, -32, -44, -70, -79, 122, -70, -79, -25,
|
155
|
+
-29, -70, -79, -79, -71, -72, -79, -70, -79, -79,
|
156
|
+
-79, -79, -79, -16, -79, -26, -44, -45, -79, -47,
|
157
|
+
-79, -73, -44, -75, -70, -77, -70, -7, -15, -17,
|
158
|
+
-79, -27, -33, -70, -46, -48, -79, -74, -79, -79,
|
159
|
+
-79, -26, -49, -50, -51, -52, -53, -54, -55, -56,
|
160
|
+
-57, -58, -79, -79, -79, -69, -76, -78, -22, -19,
|
161
|
+
-79, -34, -59, -60, -79, -62, -64, -79, -66, -79,
|
162
|
+
-18, -20, -79, -79, -61, -63, -65, -67, -79, -23,
|
163
|
+
-21, -68 ]
|
148
164
|
|
149
165
|
racc_goto_table = [
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
nil, nil, nil,
|
157
|
-
nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
158
|
-
nil,
|
159
|
-
nil, nil, nil, nil,
|
166
|
+
17, 82, 65, 29, 67, 98, 35, 72, 71, 59,
|
167
|
+
49, 47, 53, 51, 61, 41, 2, 55, 105, 40,
|
168
|
+
3, 16, 37, 63, 75, 113, 69, 66, 52, 115,
|
169
|
+
110, 96, 97, 101, 71, 56, 60, 119, 73, 62,
|
170
|
+
78, 64, 79, 121, 77, 108, 28, 70, 58, 81,
|
171
|
+
4, 60, 104, 15, 107, 1, nil, nil, 117, nil,
|
172
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
173
|
+
nil, nil, nil, 99, nil, nil, nil, nil, nil, nil,
|
174
|
+
nil, nil, nil, nil, nil, 102, nil, 109, nil, nil,
|
175
|
+
nil, nil, nil, 99, nil, nil, nil, nil, nil, nil,
|
176
|
+
109 ]
|
160
177
|
|
161
178
|
racc_goto_check = [
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
nil, nil, nil,
|
169
|
-
nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
170
|
-
nil,
|
171
|
-
nil, nil, nil, nil,
|
179
|
+
12, 17, 11, 20, 11, 15, 12, 19, 11, 27,
|
180
|
+
10, 25, 14, 10, 36, 24, 2, 10, 17, 20,
|
181
|
+
3, 8, 9, 10, 27, 15, 14, 25, 13, 17,
|
182
|
+
16, 11, 11, 19, 11, 12, 12, 17, 24, 12,
|
183
|
+
10, 12, 10, 17, 24, 34, 18, 12, 26, 10,
|
184
|
+
4, 12, 32, 4, 33, 1, nil, nil, 34, nil,
|
185
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
186
|
+
nil, nil, nil, 12, nil, nil, nil, nil, nil, nil,
|
187
|
+
nil, nil, nil, nil, nil, 12, nil, 12, nil, nil,
|
188
|
+
nil, nil, nil, 12, nil, nil, nil, nil, nil, nil,
|
189
|
+
12 ]
|
172
190
|
|
173
191
|
racc_goto_pointer = [
|
174
|
-
nil,
|
175
|
-
|
176
|
-
nil, nil, nil, -
|
177
|
-
nil,
|
192
|
+
nil, 55, 16, 20, 50, nil, nil, nil, 14, 6,
|
193
|
+
-24, -47, -7, -10, -26, -75, -68, -75, 34, -48,
|
194
|
+
-9, nil, nil, nil, -18, -23, 5, -34, nil, nil,
|
195
|
+
nil, nil, -41, -40, -49, nil, -30 ]
|
178
196
|
|
179
197
|
racc_goto_default = [
|
180
198
|
nil, nil, nil, nil, nil, 5, 6, 7, nil, nil,
|
181
|
-
nil, 8,
|
182
|
-
|
183
|
-
|
199
|
+
nil, 8, 33, nil, nil, nil, nil, nil, nil, nil,
|
200
|
+
nil, 30, 31, 32, nil, 18, nil, nil, 88, 89,
|
201
|
+
90, 91, nil, nil, nil, 44, 45 ]
|
184
202
|
|
185
203
|
racc_reduce_table = [
|
186
204
|
0, 0, :racc_error,
|
187
|
-
1, 23, :_reduce_none,
|
188
|
-
1, 24, :_reduce_2,
|
189
|
-
1, 25, :_reduce_3,
|
190
|
-
2, 25, :_reduce_4,
|
191
205
|
1, 26, :_reduce_none,
|
192
|
-
1,
|
193
|
-
|
194
|
-
|
195
|
-
0, 30, :_reduce_9,
|
196
|
-
1, 30, :_reduce_none,
|
197
|
-
0, 31, :_reduce_11,
|
198
|
-
3, 31, :_reduce_12,
|
199
|
-
1, 34, :_reduce_13,
|
200
|
-
2, 34, :_reduce_14,
|
201
|
-
5, 35, :_reduce_15,
|
202
|
-
1, 36, :_reduce_16,
|
203
|
-
2, 36, :_reduce_17,
|
204
|
-
3, 36, :_reduce_18,
|
205
|
-
0, 37, :_reduce_19,
|
206
|
-
2, 37, :_reduce_20,
|
207
|
-
2, 33, :_reduce_21,
|
208
|
-
3, 33, :_reduce_22,
|
209
|
-
0, 40, :_reduce_23,
|
210
|
-
1, 40, :_reduce_24,
|
211
|
-
1, 39, :_reduce_25,
|
212
|
-
2, 39, :_reduce_26,
|
213
|
-
1, 41, :_reduce_none,
|
214
|
-
1, 41, :_reduce_none,
|
215
|
-
1, 41, :_reduce_none,
|
216
|
-
4, 42, :_reduce_30,
|
217
|
-
6, 42, :_reduce_31,
|
206
|
+
1, 27, :_reduce_2,
|
207
|
+
1, 28, :_reduce_3,
|
208
|
+
2, 28, :_reduce_4,
|
218
209
|
1, 29, :_reduce_none,
|
219
210
|
1, 29, :_reduce_none,
|
220
|
-
|
221
|
-
1,
|
222
|
-
1, 46, :_reduce_none,
|
223
|
-
1, 46, :_reduce_none,
|
224
|
-
0, 45, :_reduce_38,
|
225
|
-
2, 45, :_reduce_39,
|
226
|
-
3, 45, :_reduce_40,
|
227
|
-
1, 47, :_reduce_41,
|
228
|
-
2, 47, :_reduce_42,
|
229
|
-
3, 48, :_reduce_43,
|
230
|
-
1, 38, :_reduce_44,
|
231
|
-
1, 38, :_reduce_45,
|
232
|
-
1, 38, :_reduce_46,
|
233
|
-
1, 38, :_reduce_47,
|
234
|
-
1, 38, :_reduce_48,
|
235
|
-
1, 38, :_reduce_none,
|
236
|
-
1, 38, :_reduce_none,
|
237
|
-
1, 38, :_reduce_none,
|
238
|
-
1, 38, :_reduce_none,
|
239
|
-
2, 49, :_reduce_53,
|
240
|
-
2, 50, :_reduce_54,
|
241
|
-
3, 50, :_reduce_55,
|
242
|
-
1, 53, :_reduce_56,
|
243
|
-
2, 53, :_reduce_57,
|
244
|
-
2, 51, :_reduce_58,
|
245
|
-
3, 51, :_reduce_59,
|
246
|
-
1, 54, :_reduce_60,
|
247
|
-
2, 54, :_reduce_61,
|
248
|
-
3, 55, :_reduce_62,
|
249
|
-
1, 52, :_reduce_63,
|
250
|
-
0, 32, :_reduce_64,
|
211
|
+
5, 30, :_reduce_7,
|
212
|
+
1, 30, :_reduce_8,
|
251
213
|
1, 32, :_reduce_none,
|
252
|
-
1,
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
3,
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
214
|
+
1, 32, :_reduce_none,
|
215
|
+
1, 32, :_reduce_none,
|
216
|
+
0, 33, :_reduce_12,
|
217
|
+
1, 33, :_reduce_none,
|
218
|
+
0, 34, :_reduce_14,
|
219
|
+
3, 34, :_reduce_15,
|
220
|
+
1, 38, :_reduce_16,
|
221
|
+
2, 38, :_reduce_17,
|
222
|
+
5, 39, :_reduce_18,
|
223
|
+
1, 40, :_reduce_19,
|
224
|
+
2, 40, :_reduce_20,
|
225
|
+
3, 40, :_reduce_21,
|
226
|
+
0, 41, :_reduce_22,
|
227
|
+
2, 41, :_reduce_23,
|
228
|
+
2, 36, :_reduce_24,
|
229
|
+
3, 36, :_reduce_25,
|
230
|
+
0, 44, :_reduce_26,
|
231
|
+
1, 44, :_reduce_27,
|
232
|
+
1, 43, :_reduce_28,
|
233
|
+
2, 43, :_reduce_29,
|
234
|
+
1, 45, :_reduce_none,
|
235
|
+
1, 45, :_reduce_none,
|
236
|
+
1, 45, :_reduce_none,
|
237
|
+
4, 46, :_reduce_33,
|
238
|
+
6, 46, :_reduce_34,
|
239
|
+
1, 37, :_reduce_none,
|
240
|
+
1, 37, :_reduce_none,
|
241
|
+
1, 50, :_reduce_none,
|
242
|
+
1, 50, :_reduce_none,
|
243
|
+
1, 50, :_reduce_none,
|
244
|
+
1, 50, :_reduce_none,
|
245
|
+
1, 50, :_reduce_none,
|
246
|
+
1, 50, :_reduce_none,
|
247
|
+
1, 50, :_reduce_none,
|
248
|
+
0, 49, :_reduce_44,
|
249
|
+
2, 49, :_reduce_45,
|
250
|
+
3, 49, :_reduce_46,
|
251
|
+
1, 51, :_reduce_47,
|
252
|
+
2, 51, :_reduce_48,
|
253
|
+
3, 52, :_reduce_49,
|
254
|
+
1, 42, :_reduce_50,
|
255
|
+
1, 42, :_reduce_51,
|
256
|
+
1, 42, :_reduce_52,
|
257
|
+
1, 42, :_reduce_53,
|
258
|
+
1, 42, :_reduce_54,
|
259
|
+
1, 42, :_reduce_none,
|
260
|
+
1, 42, :_reduce_none,
|
261
|
+
1, 42, :_reduce_none,
|
262
|
+
1, 42, :_reduce_none,
|
263
|
+
2, 53, :_reduce_59,
|
264
|
+
2, 54, :_reduce_60,
|
265
|
+
3, 54, :_reduce_61,
|
266
|
+
1, 57, :_reduce_62,
|
267
|
+
2, 57, :_reduce_63,
|
268
|
+
2, 55, :_reduce_64,
|
269
|
+
3, 55, :_reduce_65,
|
270
|
+
1, 58, :_reduce_66,
|
271
|
+
2, 58, :_reduce_67,
|
272
|
+
3, 59, :_reduce_68,
|
273
|
+
1, 56, :_reduce_69,
|
274
|
+
0, 35, :_reduce_70,
|
275
|
+
1, 35, :_reduce_none,
|
276
|
+
1, 60, :_reduce_72,
|
277
|
+
2, 60, :_reduce_73,
|
278
|
+
3, 61, :_reduce_74,
|
279
|
+
3, 47, :_reduce_75,
|
280
|
+
5, 48, :_reduce_76,
|
281
|
+
3, 48, :_reduce_77,
|
282
|
+
6, 31, :_reduce_78 ]
|
283
|
+
|
284
|
+
racc_reduce_n = 79
|
285
|
+
|
286
|
+
racc_shift_n = 122
|
263
287
|
|
264
288
|
racc_token_table = {
|
265
289
|
false => 0,
|
266
290
|
:error => 1,
|
267
|
-
:
|
268
|
-
:
|
269
|
-
:
|
270
|
-
:
|
271
|
-
:
|
272
|
-
:
|
273
|
-
:
|
274
|
-
:
|
275
|
-
:
|
276
|
-
:
|
277
|
-
:
|
278
|
-
:
|
279
|
-
:
|
280
|
-
:
|
281
|
-
:
|
282
|
-
:
|
283
|
-
:
|
284
|
-
:
|
285
|
-
:
|
286
|
-
:
|
287
|
-
|
288
|
-
|
291
|
+
:QUERY => 2,
|
292
|
+
:MUTATION => 3,
|
293
|
+
:SUBSCRIPTION => 4,
|
294
|
+
:RPAREN => 5,
|
295
|
+
:LPAREN => 6,
|
296
|
+
:VAR_SIGN => 7,
|
297
|
+
:COLON => 8,
|
298
|
+
:BANG => 9,
|
299
|
+
:RBRACKET => 10,
|
300
|
+
:LBRACKET => 11,
|
301
|
+
:EQUALS => 12,
|
302
|
+
:RCURLY => 13,
|
303
|
+
:LCURLY => 14,
|
304
|
+
:ON => 15,
|
305
|
+
:IDENTIFIER => 16,
|
306
|
+
:FRAGMENT => 17,
|
307
|
+
:TRUE => 18,
|
308
|
+
:FALSE => 19,
|
309
|
+
:FLOAT => 20,
|
310
|
+
:INT => 21,
|
311
|
+
:STRING => 22,
|
312
|
+
:DIR_SIGN => 23,
|
313
|
+
:ELLIPSIS => 24 }
|
314
|
+
|
315
|
+
racc_nt_base = 25
|
289
316
|
|
290
317
|
racc_use_result_var = true
|
291
318
|
|
@@ -308,6 +335,9 @@ Racc_arg = [
|
|
308
335
|
Racc_token_to_s_table = [
|
309
336
|
"$end",
|
310
337
|
"error",
|
338
|
+
"QUERY",
|
339
|
+
"MUTATION",
|
340
|
+
"SUBSCRIPTION",
|
311
341
|
"RPAREN",
|
312
342
|
"LPAREN",
|
313
343
|
"VAR_SIGN",
|
@@ -335,11 +365,12 @@ Racc_token_to_s_table = [
|
|
335
365
|
"definition",
|
336
366
|
"operation_definition",
|
337
367
|
"fragment_definition",
|
338
|
-
"
|
368
|
+
"operation_type",
|
339
369
|
"operation_name_opt",
|
340
370
|
"variable_definitions_opt",
|
341
371
|
"directives_list_opt",
|
342
372
|
"selection_set",
|
373
|
+
"name",
|
343
374
|
"variable_definitions_list",
|
344
375
|
"variable_definition",
|
345
376
|
"variable_definition_type_name",
|
@@ -428,45 +459,51 @@ module_eval(<<'.,.,', 'parser.y', 28)
|
|
428
459
|
end
|
429
460
|
.,.,
|
430
461
|
|
431
|
-
|
432
|
-
|
462
|
+
# reduce 9 omitted
|
463
|
+
|
464
|
+
# reduce 10 omitted
|
465
|
+
|
466
|
+
# reduce 11 omitted
|
467
|
+
|
468
|
+
module_eval(<<'.,.,', 'parser.y', 42)
|
469
|
+
def _reduce_12(val, _values, result)
|
433
470
|
return nil
|
434
471
|
result
|
435
472
|
end
|
436
473
|
.,.,
|
437
474
|
|
438
|
-
# reduce
|
475
|
+
# reduce 13 omitted
|
439
476
|
|
440
|
-
module_eval(<<'.,.,', 'parser.y',
|
441
|
-
def
|
477
|
+
module_eval(<<'.,.,', 'parser.y', 46)
|
478
|
+
def _reduce_14(val, _values, result)
|
442
479
|
return []
|
443
480
|
result
|
444
481
|
end
|
445
482
|
.,.,
|
446
483
|
|
447
|
-
module_eval(<<'.,.,', 'parser.y',
|
448
|
-
def
|
484
|
+
module_eval(<<'.,.,', 'parser.y', 47)
|
485
|
+
def _reduce_15(val, _values, result)
|
449
486
|
return val[1]
|
450
487
|
result
|
451
488
|
end
|
452
489
|
.,.,
|
453
490
|
|
454
|
-
module_eval(<<'.,.,', 'parser.y',
|
455
|
-
def
|
491
|
+
module_eval(<<'.,.,', 'parser.y', 50)
|
492
|
+
def _reduce_16(val, _values, result)
|
456
493
|
return [val[0]]
|
457
494
|
result
|
458
495
|
end
|
459
496
|
.,.,
|
460
497
|
|
461
|
-
module_eval(<<'.,.,', 'parser.y',
|
462
|
-
def
|
498
|
+
module_eval(<<'.,.,', 'parser.y', 51)
|
499
|
+
def _reduce_17(val, _values, result)
|
463
500
|
val[0] << val[1]
|
464
501
|
result
|
465
502
|
end
|
466
503
|
.,.,
|
467
504
|
|
468
|
-
module_eval(<<'.,.,', 'parser.y',
|
469
|
-
def
|
505
|
+
module_eval(<<'.,.,', 'parser.y', 55)
|
506
|
+
def _reduce_18(val, _values, result)
|
470
507
|
return make_node(:VariableDefinition, {
|
471
508
|
name: val[1],
|
472
509
|
type: val[3],
|
@@ -478,91 +515,91 @@ module_eval(<<'.,.,', 'parser.y', 50)
|
|
478
515
|
end
|
479
516
|
.,.,
|
480
517
|
|
481
|
-
module_eval(<<'.,.,', 'parser.y',
|
482
|
-
def
|
518
|
+
module_eval(<<'.,.,', 'parser.y', 64)
|
519
|
+
def _reduce_19(val, _values, result)
|
483
520
|
return make_node(:TypeName, name: val[0])
|
484
521
|
result
|
485
522
|
end
|
486
523
|
.,.,
|
487
524
|
|
488
|
-
module_eval(<<'.,.,', 'parser.y',
|
489
|
-
def
|
525
|
+
module_eval(<<'.,.,', 'parser.y', 65)
|
526
|
+
def _reduce_20(val, _values, result)
|
490
527
|
return make_node(:NonNullType, of_type: val[0])
|
491
528
|
result
|
492
529
|
end
|
493
530
|
.,.,
|
494
531
|
|
495
|
-
module_eval(<<'.,.,', 'parser.y',
|
496
|
-
def
|
532
|
+
module_eval(<<'.,.,', 'parser.y', 66)
|
533
|
+
def _reduce_21(val, _values, result)
|
497
534
|
return make_node(:ListType, of_type: val[1])
|
498
535
|
result
|
499
536
|
end
|
500
537
|
.,.,
|
501
538
|
|
502
|
-
module_eval(<<'.,.,', 'parser.y',
|
503
|
-
def
|
539
|
+
module_eval(<<'.,.,', 'parser.y', 69)
|
540
|
+
def _reduce_22(val, _values, result)
|
504
541
|
return nil
|
505
542
|
result
|
506
543
|
end
|
507
544
|
.,.,
|
508
545
|
|
509
|
-
module_eval(<<'.,.,', 'parser.y',
|
510
|
-
def
|
546
|
+
module_eval(<<'.,.,', 'parser.y', 70)
|
547
|
+
def _reduce_23(val, _values, result)
|
511
548
|
return val[1]
|
512
549
|
result
|
513
550
|
end
|
514
551
|
.,.,
|
515
552
|
|
516
|
-
module_eval(<<'.,.,', 'parser.y',
|
517
|
-
def
|
553
|
+
module_eval(<<'.,.,', 'parser.y', 73)
|
554
|
+
def _reduce_24(val, _values, result)
|
518
555
|
return []
|
519
556
|
result
|
520
557
|
end
|
521
558
|
.,.,
|
522
559
|
|
523
|
-
module_eval(<<'.,.,', 'parser.y',
|
524
|
-
def
|
560
|
+
module_eval(<<'.,.,', 'parser.y', 74)
|
561
|
+
def _reduce_25(val, _values, result)
|
525
562
|
return val[1]
|
526
563
|
result
|
527
564
|
end
|
528
565
|
.,.,
|
529
566
|
|
530
|
-
module_eval(<<'.,.,', 'parser.y',
|
531
|
-
def
|
567
|
+
module_eval(<<'.,.,', 'parser.y', 77)
|
568
|
+
def _reduce_26(val, _values, result)
|
532
569
|
return []
|
533
570
|
result
|
534
571
|
end
|
535
572
|
.,.,
|
536
573
|
|
537
|
-
module_eval(<<'.,.,', 'parser.y',
|
538
|
-
def
|
574
|
+
module_eval(<<'.,.,', 'parser.y', 78)
|
575
|
+
def _reduce_27(val, _values, result)
|
539
576
|
return val[0]
|
540
577
|
result
|
541
578
|
end
|
542
579
|
.,.,
|
543
580
|
|
544
|
-
module_eval(<<'.,.,', 'parser.y',
|
545
|
-
def
|
581
|
+
module_eval(<<'.,.,', 'parser.y', 81)
|
582
|
+
def _reduce_28(val, _values, result)
|
546
583
|
return [result]
|
547
584
|
result
|
548
585
|
end
|
549
586
|
.,.,
|
550
587
|
|
551
|
-
module_eval(<<'.,.,', 'parser.y',
|
552
|
-
def
|
588
|
+
module_eval(<<'.,.,', 'parser.y', 82)
|
589
|
+
def _reduce_29(val, _values, result)
|
553
590
|
val[0] << val[1]
|
554
591
|
result
|
555
592
|
end
|
556
593
|
.,.,
|
557
594
|
|
558
|
-
# reduce
|
595
|
+
# reduce 30 omitted
|
559
596
|
|
560
|
-
# reduce
|
597
|
+
# reduce 31 omitted
|
561
598
|
|
562
|
-
# reduce
|
599
|
+
# reduce 32 omitted
|
563
600
|
|
564
|
-
module_eval(<<'.,.,', 'parser.y',
|
565
|
-
def
|
601
|
+
module_eval(<<'.,.,', 'parser.y', 91)
|
602
|
+
def _reduce_33(val, _values, result)
|
566
603
|
return make_node(
|
567
604
|
:Field, {
|
568
605
|
name: val[0],
|
@@ -577,8 +614,8 @@ module_eval(<<'.,.,', 'parser.y', 86)
|
|
577
614
|
end
|
578
615
|
.,.,
|
579
616
|
|
580
|
-
module_eval(<<'.,.,', 'parser.y',
|
581
|
-
def
|
617
|
+
module_eval(<<'.,.,', 'parser.y', 102)
|
618
|
+
def _reduce_34(val, _values, result)
|
582
619
|
return make_node(
|
583
620
|
:Field, {
|
584
621
|
alias: val[0],
|
@@ -594,219 +631,225 @@ module_eval(<<'.,.,', 'parser.y', 97)
|
|
594
631
|
end
|
595
632
|
.,.,
|
596
633
|
|
597
|
-
# reduce 32 omitted
|
598
|
-
|
599
|
-
# reduce 33 omitted
|
600
|
-
|
601
|
-
# reduce 34 omitted
|
602
|
-
|
603
634
|
# reduce 35 omitted
|
604
635
|
|
605
636
|
# reduce 36 omitted
|
606
637
|
|
607
638
|
# reduce 37 omitted
|
608
639
|
|
609
|
-
|
610
|
-
|
640
|
+
# reduce 38 omitted
|
641
|
+
|
642
|
+
# reduce 39 omitted
|
643
|
+
|
644
|
+
# reduce 40 omitted
|
645
|
+
|
646
|
+
# reduce 41 omitted
|
647
|
+
|
648
|
+
# reduce 42 omitted
|
649
|
+
|
650
|
+
# reduce 43 omitted
|
651
|
+
|
652
|
+
module_eval(<<'.,.,', 'parser.y', 128)
|
653
|
+
def _reduce_44(val, _values, result)
|
611
654
|
return []
|
612
655
|
result
|
613
656
|
end
|
614
657
|
.,.,
|
615
658
|
|
616
|
-
module_eval(<<'.,.,', 'parser.y',
|
617
|
-
def
|
659
|
+
module_eval(<<'.,.,', 'parser.y', 129)
|
660
|
+
def _reduce_45(val, _values, result)
|
618
661
|
return []
|
619
662
|
result
|
620
663
|
end
|
621
664
|
.,.,
|
622
665
|
|
623
|
-
module_eval(<<'.,.,', 'parser.y',
|
624
|
-
def
|
666
|
+
module_eval(<<'.,.,', 'parser.y', 130)
|
667
|
+
def _reduce_46(val, _values, result)
|
625
668
|
return val[1]
|
626
669
|
result
|
627
670
|
end
|
628
671
|
.,.,
|
629
672
|
|
630
|
-
module_eval(<<'.,.,', 'parser.y',
|
631
|
-
def
|
673
|
+
module_eval(<<'.,.,', 'parser.y', 133)
|
674
|
+
def _reduce_47(val, _values, result)
|
632
675
|
return [val[0]]
|
633
676
|
result
|
634
677
|
end
|
635
678
|
.,.,
|
636
679
|
|
637
|
-
module_eval(<<'.,.,', 'parser.y',
|
638
|
-
def
|
680
|
+
module_eval(<<'.,.,', 'parser.y', 134)
|
681
|
+
def _reduce_48(val, _values, result)
|
639
682
|
val[0] << val[1]
|
640
683
|
result
|
641
684
|
end
|
642
685
|
.,.,
|
643
686
|
|
644
|
-
module_eval(<<'.,.,', 'parser.y',
|
645
|
-
def
|
687
|
+
module_eval(<<'.,.,', 'parser.y', 137)
|
688
|
+
def _reduce_49(val, _values, result)
|
646
689
|
return make_node(:Argument, name: val[0], value: val[2], position_source: val[0])
|
647
690
|
result
|
648
691
|
end
|
649
692
|
.,.,
|
650
693
|
|
651
|
-
module_eval(<<'.,.,', 'parser.y',
|
652
|
-
def
|
694
|
+
module_eval(<<'.,.,', 'parser.y', 140)
|
695
|
+
def _reduce_50(val, _values, result)
|
653
696
|
return val[0].to_f
|
654
697
|
result
|
655
698
|
end
|
656
699
|
.,.,
|
657
700
|
|
658
|
-
module_eval(<<'.,.,', 'parser.y',
|
659
|
-
def
|
701
|
+
module_eval(<<'.,.,', 'parser.y', 141)
|
702
|
+
def _reduce_51(val, _values, result)
|
660
703
|
return val[0].to_i
|
661
704
|
result
|
662
705
|
end
|
663
706
|
.,.,
|
664
707
|
|
665
|
-
module_eval(<<'.,.,', 'parser.y',
|
666
|
-
def
|
708
|
+
module_eval(<<'.,.,', 'parser.y', 142)
|
709
|
+
def _reduce_52(val, _values, result)
|
667
710
|
return val[0].to_s
|
668
711
|
result
|
669
712
|
end
|
670
713
|
.,.,
|
671
714
|
|
672
|
-
module_eval(<<'.,.,', 'parser.y',
|
673
|
-
def
|
715
|
+
module_eval(<<'.,.,', 'parser.y', 143)
|
716
|
+
def _reduce_53(val, _values, result)
|
674
717
|
return true
|
675
718
|
result
|
676
719
|
end
|
677
720
|
.,.,
|
678
721
|
|
679
|
-
module_eval(<<'.,.,', 'parser.y',
|
680
|
-
def
|
722
|
+
module_eval(<<'.,.,', 'parser.y', 144)
|
723
|
+
def _reduce_54(val, _values, result)
|
681
724
|
return false
|
682
725
|
result
|
683
726
|
end
|
684
727
|
.,.,
|
685
728
|
|
686
|
-
# reduce
|
729
|
+
# reduce 55 omitted
|
687
730
|
|
688
|
-
# reduce
|
731
|
+
# reduce 56 omitted
|
689
732
|
|
690
|
-
# reduce
|
733
|
+
# reduce 57 omitted
|
691
734
|
|
692
|
-
# reduce
|
735
|
+
# reduce 58 omitted
|
693
736
|
|
694
|
-
module_eval(<<'.,.,', 'parser.y',
|
695
|
-
def
|
737
|
+
module_eval(<<'.,.,', 'parser.y', 150)
|
738
|
+
def _reduce_59(val, _values, result)
|
696
739
|
return make_node(:VariableIdentifier, name: val[1], position_source: val[0])
|
697
740
|
result
|
698
741
|
end
|
699
742
|
.,.,
|
700
743
|
|
701
|
-
module_eval(<<'.,.,', 'parser.y',
|
702
|
-
def
|
744
|
+
module_eval(<<'.,.,', 'parser.y', 153)
|
745
|
+
def _reduce_60(val, _values, result)
|
703
746
|
return []
|
704
747
|
result
|
705
748
|
end
|
706
749
|
.,.,
|
707
750
|
|
708
|
-
module_eval(<<'.,.,', 'parser.y',
|
709
|
-
def
|
751
|
+
module_eval(<<'.,.,', 'parser.y', 154)
|
752
|
+
def _reduce_61(val, _values, result)
|
710
753
|
return val[1]
|
711
754
|
result
|
712
755
|
end
|
713
756
|
.,.,
|
714
757
|
|
715
|
-
module_eval(<<'.,.,', 'parser.y',
|
716
|
-
def
|
758
|
+
module_eval(<<'.,.,', 'parser.y', 157)
|
759
|
+
def _reduce_62(val, _values, result)
|
717
760
|
return [val[0]]
|
718
761
|
result
|
719
762
|
end
|
720
763
|
.,.,
|
721
764
|
|
722
|
-
module_eval(<<'.,.,', 'parser.y',
|
723
|
-
def
|
765
|
+
module_eval(<<'.,.,', 'parser.y', 158)
|
766
|
+
def _reduce_63(val, _values, result)
|
724
767
|
val[0] << val[1]
|
725
768
|
result
|
726
769
|
end
|
727
770
|
.,.,
|
728
771
|
|
729
|
-
module_eval(<<'.,.,', 'parser.y',
|
730
|
-
def
|
772
|
+
module_eval(<<'.,.,', 'parser.y', 161)
|
773
|
+
def _reduce_64(val, _values, result)
|
731
774
|
return make_node(:InputObject, arguments: [], position_source: val[0])
|
732
775
|
result
|
733
776
|
end
|
734
777
|
.,.,
|
735
778
|
|
736
|
-
module_eval(<<'.,.,', 'parser.y',
|
737
|
-
def
|
779
|
+
module_eval(<<'.,.,', 'parser.y', 162)
|
780
|
+
def _reduce_65(val, _values, result)
|
738
781
|
return make_node(:InputObject, arguments: val[1], position_source: val[0])
|
739
782
|
result
|
740
783
|
end
|
741
784
|
.,.,
|
742
785
|
|
743
|
-
module_eval(<<'.,.,', 'parser.y',
|
744
|
-
def
|
786
|
+
module_eval(<<'.,.,', 'parser.y', 165)
|
787
|
+
def _reduce_66(val, _values, result)
|
745
788
|
return [val[0]]
|
746
789
|
result
|
747
790
|
end
|
748
791
|
.,.,
|
749
792
|
|
750
|
-
module_eval(<<'.,.,', 'parser.y',
|
751
|
-
def
|
793
|
+
module_eval(<<'.,.,', 'parser.y', 166)
|
794
|
+
def _reduce_67(val, _values, result)
|
752
795
|
val[0] << val[1]
|
753
796
|
result
|
754
797
|
end
|
755
798
|
.,.,
|
756
799
|
|
757
|
-
module_eval(<<'.,.,', 'parser.y',
|
758
|
-
def
|
800
|
+
module_eval(<<'.,.,', 'parser.y', 169)
|
801
|
+
def _reduce_68(val, _values, result)
|
759
802
|
return make_node(:Argument, name: val[0], value: val[2], position_source: val[0])
|
760
803
|
result
|
761
804
|
end
|
762
805
|
.,.,
|
763
806
|
|
764
|
-
module_eval(<<'.,.,', 'parser.y',
|
765
|
-
def
|
807
|
+
module_eval(<<'.,.,', 'parser.y', 171)
|
808
|
+
def _reduce_69(val, _values, result)
|
766
809
|
return make_node(:Enum, name: val[0], position_source: val[0])
|
767
810
|
result
|
768
811
|
end
|
769
812
|
.,.,
|
770
813
|
|
771
|
-
module_eval(<<'.,.,', 'parser.y',
|
772
|
-
def
|
814
|
+
module_eval(<<'.,.,', 'parser.y', 174)
|
815
|
+
def _reduce_70(val, _values, result)
|
773
816
|
return []
|
774
817
|
result
|
775
818
|
end
|
776
819
|
.,.,
|
777
820
|
|
778
|
-
# reduce
|
821
|
+
# reduce 71 omitted
|
779
822
|
|
780
|
-
module_eval(<<'.,.,', 'parser.y',
|
781
|
-
def
|
823
|
+
module_eval(<<'.,.,', 'parser.y', 178)
|
824
|
+
def _reduce_72(val, _values, result)
|
782
825
|
return [val[0]]
|
783
826
|
result
|
784
827
|
end
|
785
828
|
.,.,
|
786
829
|
|
787
|
-
module_eval(<<'.,.,', 'parser.y',
|
788
|
-
def
|
830
|
+
module_eval(<<'.,.,', 'parser.y', 179)
|
831
|
+
def _reduce_73(val, _values, result)
|
789
832
|
val[0] << val[1]
|
790
833
|
result
|
791
834
|
end
|
792
835
|
.,.,
|
793
836
|
|
794
|
-
module_eval(<<'.,.,', 'parser.y',
|
795
|
-
def
|
837
|
+
module_eval(<<'.,.,', 'parser.y', 181)
|
838
|
+
def _reduce_74(val, _values, result)
|
796
839
|
return make_node(:Directive, name: val[1], arguments: val[2], position_source: val[0])
|
797
840
|
result
|
798
841
|
end
|
799
842
|
.,.,
|
800
843
|
|
801
|
-
module_eval(<<'.,.,', 'parser.y',
|
802
|
-
def
|
844
|
+
module_eval(<<'.,.,', 'parser.y', 184)
|
845
|
+
def _reduce_75(val, _values, result)
|
803
846
|
return make_node(:FragmentSpread, name: val[1], directives: val[2], position_source: val[0])
|
804
847
|
result
|
805
848
|
end
|
806
849
|
.,.,
|
807
850
|
|
808
|
-
module_eval(<<'.,.,', 'parser.y',
|
809
|
-
def
|
851
|
+
module_eval(<<'.,.,', 'parser.y', 188)
|
852
|
+
def _reduce_76(val, _values, result)
|
810
853
|
return make_node(:InlineFragment, {
|
811
854
|
type: val[2],
|
812
855
|
directives: val[3],
|
@@ -818,8 +861,8 @@ module_eval(<<'.,.,', 'parser.y', 180)
|
|
818
861
|
end
|
819
862
|
.,.,
|
820
863
|
|
821
|
-
module_eval(<<'.,.,', 'parser.y',
|
822
|
-
def
|
864
|
+
module_eval(<<'.,.,', 'parser.y', 196)
|
865
|
+
def _reduce_77(val, _values, result)
|
823
866
|
return make_node(:InlineFragment, {
|
824
867
|
type: nil,
|
825
868
|
directives: val[1],
|
@@ -831,8 +874,8 @@ module_eval(<<'.,.,', 'parser.y', 188)
|
|
831
874
|
end
|
832
875
|
.,.,
|
833
876
|
|
834
|
-
module_eval(<<'.,.,', 'parser.y',
|
835
|
-
def
|
877
|
+
module_eval(<<'.,.,', 'parser.y', 206)
|
878
|
+
def _reduce_78(val, _values, result)
|
836
879
|
return make_node(:FragmentDefinition, {
|
837
880
|
name: val[1],
|
838
881
|
type: val[3],
|