graphql 0.13.0 → 0.14.0
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/define/assign_argument.rb +3 -5
- data/lib/graphql/field.rb +1 -3
- data/lib/graphql/input_object_type.rb +4 -1
- data/lib/graphql/language.rb +1 -0
- data/lib/graphql/language/generation.rb +94 -0
- data/lib/graphql/language/lexer.rb +229 -201
- data/lib/graphql/language/lexer.rl +24 -7
- data/lib/graphql/language/nodes.rb +4 -0
- data/lib/graphql/language/parser.rb +195 -187
- data/lib/graphql/language/parser.y +11 -4
- data/lib/graphql/object_type.rb +21 -0
- data/lib/graphql/query.rb +8 -3
- data/lib/graphql/query/serial_execution/operation_resolution.rb +2 -2
- data/lib/graphql/query/serial_execution/value_resolution.rb +5 -0
- data/lib/graphql/schema.rb +11 -19
- data/lib/graphql/schema/invalid_type_error.rb +6 -0
- data/lib/graphql/schema/reduce_types.rb +68 -0
- data/lib/graphql/schema/type_expression.rb +6 -16
- data/lib/graphql/schema/type_map.rb +1 -5
- data/lib/graphql/schema/validation.rb +164 -0
- data/lib/graphql/version.rb +1 -1
- data/readme.md +3 -4
- data/spec/graphql/argument_spec.rb +20 -0
- data/spec/graphql/field_spec.rb +16 -0
- data/spec/graphql/introspection/schema_type_spec.rb +1 -0
- data/spec/graphql/language/generation_spec.rb +42 -0
- data/spec/graphql/language/parser_spec.rb +136 -26
- data/spec/graphql/query/serial_execution/value_resolution_spec.rb +23 -0
- data/spec/graphql/query_spec.rb +51 -0
- data/spec/graphql/schema/{type_reducer_spec.rb → reduce_types_spec.rb} +16 -14
- data/spec/graphql/schema/type_expression_spec.rb +4 -4
- data/spec/graphql/schema/validation_spec.rb +219 -0
- data/spec/support/dairy_app.rb +3 -0
- metadata +14 -13
- data/lib/graphql/schema/each_item_validator.rb +0 -21
- data/lib/graphql/schema/field_validator.rb +0 -17
- data/lib/graphql/schema/implementation_validator.rb +0 -31
- data/lib/graphql/schema/type_reducer.rb +0 -79
- data/lib/graphql/schema/type_validator.rb +0 -58
- data/spec/graphql/schema/field_validator_spec.rb +0 -21
- data/spec/graphql/schema/type_validator_spec.rb +0 -81
@@ -13,6 +13,7 @@
|
|
13
13
|
FRAGMENT = 'fragment';
|
14
14
|
TRUE = 'true';
|
15
15
|
FALSE = 'false';
|
16
|
+
NULL = 'null';
|
16
17
|
RCURLY = '{';
|
17
18
|
LCURLY = '}';
|
18
19
|
RPAREN = '(';
|
@@ -31,6 +32,9 @@
|
|
31
32
|
|
32
33
|
QUOTED_STRING = QUOTE STRING_CHAR* QUOTE;
|
33
34
|
|
35
|
+
# catch-all for anything else. must be at the bottom for precedence.
|
36
|
+
UNKNOWN_CHAR = /./;
|
37
|
+
|
34
38
|
main := |*
|
35
39
|
INT => { emit_token.call(:INT) };
|
36
40
|
FLOAT => { emit_token.call(:FLOAT) };
|
@@ -38,6 +42,7 @@
|
|
38
42
|
FRAGMENT => { emit_token.call(:FRAGMENT) };
|
39
43
|
TRUE => { emit_token.call(:TRUE) };
|
40
44
|
FALSE => { emit_token.call(:FALSE) };
|
45
|
+
NULL => { emit_token.call(:NULL) };
|
41
46
|
RCURLY => { emit_token.call(:RCURLY) };
|
42
47
|
LCURLY => { emit_token.call(:LCURLY) };
|
43
48
|
RPAREN => { emit_token.call(:RPAREN) };
|
@@ -61,6 +66,8 @@
|
|
61
66
|
BLANK => { meta[:col] += te - ts };
|
62
67
|
COMMENT => { meta[:col] += te - ts };
|
63
68
|
|
69
|
+
UNKNOWN_CHAR => { emit_token.call(:UNKNOWN_CHAR) };
|
70
|
+
|
64
71
|
*|;
|
65
72
|
}%%
|
66
73
|
|
@@ -134,14 +141,24 @@ module GraphQL
|
|
134
141
|
|
135
142
|
def self.emit_string(ts, te, meta)
|
136
143
|
value = meta[:data][ts...te].pack("c*").force_encoding("UTF-8")
|
137
|
-
|
144
|
+
if value =~ /\\u|\\./ && value !~ ESCAPES
|
145
|
+
meta[:tokens] << GraphQL::Language::Token.new(
|
146
|
+
name: :BAD_UNICODE_ESCAPE,
|
147
|
+
value: value,
|
148
|
+
line: meta[:line],
|
149
|
+
col: meta[:col],
|
150
|
+
)
|
151
|
+
else
|
152
|
+
replace_escaped_characters_in_place(value)
|
153
|
+
|
154
|
+
meta[:tokens] << GraphQL::Language::Token.new(
|
155
|
+
name: :STRING,
|
156
|
+
value: value,
|
157
|
+
line: meta[:line],
|
158
|
+
col: meta[:col],
|
159
|
+
)
|
160
|
+
end
|
138
161
|
|
139
|
-
meta[:tokens] << GraphQL::Language::Token.new(
|
140
|
-
name: :STRING,
|
141
|
-
value: value,
|
142
|
-
line: meta[:line],
|
143
|
-
col: meta[:col],
|
144
|
-
)
|
145
162
|
meta[:col] += te - ts
|
146
163
|
end
|
147
164
|
end
|
@@ -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', 214)
|
16
16
|
|
17
17
|
def initialize(query_string)
|
18
18
|
@query_string = query_string
|
@@ -53,7 +53,11 @@ def on_error(parser_token_id, lexer_token, vstack)
|
|
53
53
|
raise GraphQL::ParseError.new("Parse Error on unknown token: {token_id: #{parser_token_id}, lexer_token: #{lexer_token}} from #{@query_string}", nil, nil, @query_string)
|
54
54
|
else
|
55
55
|
line, col = lexer_token.line_and_column
|
56
|
-
|
56
|
+
if lexer_token.name == :BAD_UNICODE_ESCAPE
|
57
|
+
raise GraphQL::ParseError.new("Parse error on bad Unicode escape sequence: #{lexer_token.to_s.inspect} (#{parser_token_name}) at [#{line}, #{col}]", line, col, @query_string)
|
58
|
+
else
|
59
|
+
raise GraphQL::ParseError.new("Parse error on #{lexer_token.to_s.inspect} (#{parser_token_name}) at [#{line}, #{col}]", line, col, @query_string)
|
60
|
+
end
|
57
61
|
end
|
58
62
|
end
|
59
63
|
end
|
@@ -71,112 +75,112 @@ end
|
|
71
75
|
##### State transition tables begin ###
|
72
76
|
|
73
77
|
racc_action_table = [
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
40,
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
78
|
+
86, 105, 37, 87, 106, 36, 88, 40, 105, 89,
|
79
|
+
114, 80, 81, 77, 78, 79, 86, 62, 48, 87,
|
80
|
+
70, 37, 88, 40, 44, 89, 74, 80, 81, 77,
|
81
|
+
78, 79, 86, 40, 37, 87, 9, 9, 88, 32,
|
82
|
+
9, 89, 9, 80, 81, 77, 78, 79, 86, 30,
|
83
|
+
40, 87, 108, 9, 88, 9, 40, 89, 40, 80,
|
84
|
+
81, 77, 78, 79, 86, 112, 16, 87, 97, 48,
|
85
|
+
88, 51, 40, 89, nil, 80, 81, 77, 78, 79,
|
86
|
+
11, 12, 20, 14, 15, 68, 9, nil, 11, 12,
|
87
|
+
13, 14, 15, nil, 11, 12, 20, 14, 15, 21,
|
88
|
+
11, 12, 20, 14, 15, 12, 20, 14, 15, 28,
|
89
|
+
33, 11, 12, 20, 14, 15, 94, nil, nil, nil,
|
90
|
+
28, 11, 12, 20, 14, 15, 94, nil, nil, nil,
|
91
|
+
nil, 11, 12, 20, 14, 15, 42, 12, 20, 14,
|
92
|
+
15, nil, nil, 9, 40, 11, 12, 13, 14, 15,
|
93
|
+
100, 11, 12, 20, 14, 15, 110, 11, 12, 20,
|
94
|
+
14, 15, 11, 12, 20, 14, 15, 11, 12, 20,
|
95
|
+
14, 15, 11, 12, 20, 14, 15, 11, 12, 20,
|
96
|
+
14, 15, 11, 12, 20, 14, 15, 11, 12, 20,
|
97
|
+
14, 15, 11, 12, 20, 14, 15 ]
|
94
98
|
|
95
99
|
racc_action_check = [
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
9,
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
7, 7,
|
115
|
-
|
100
|
+
112, 92, 27, 112, 92, 27, 112, 60, 107, 112,
|
101
|
+
107, 112, 112, 112, 112, 112, 106, 46, 46, 106,
|
102
|
+
54, 56, 106, 58, 29, 106, 64, 106, 106, 106,
|
103
|
+
106, 106, 70, 67, 50, 70, 72, 73, 70, 18,
|
104
|
+
75, 70, 49, 70, 70, 70, 70, 70, 98, 16,
|
105
|
+
31, 98, 98, 45, 98, 43, 41, 98, 38, 98,
|
106
|
+
98, 98, 98, 98, 87, 103, 1, 87, 87, 32,
|
107
|
+
87, 37, 35, 87, nil, 87, 87, 87, 87, 87,
|
108
|
+
37, 37, 37, 37, 37, 52, 3, nil, 3, 3,
|
109
|
+
3, 3, 3, nil, 52, 52, 52, 52, 52, 9,
|
110
|
+
9, 9, 9, 9, 9, 44, 44, 44, 44, 9,
|
111
|
+
22, 22, 22, 22, 22, 22, 74, nil, nil, nil,
|
112
|
+
22, 74, 74, 74, 74, 74, 94, nil, nil, nil,
|
113
|
+
nil, 94, 94, 94, 94, 94, 28, 28, 28, 28,
|
114
|
+
28, nil, nil, 0, 28, 0, 0, 0, 0, 0,
|
115
|
+
88, 88, 88, 88, 88, 88, 101, 101, 101, 101,
|
116
|
+
101, 101, 40, 40, 40, 40, 40, 36, 36, 36,
|
117
|
+
36, 36, 86, 86, 86, 86, 86, 7, 7, 7,
|
118
|
+
7, 7, 42, 42, 42, 42, 42, 48, 48, 48,
|
119
|
+
48, 48, 13, 13, 13, 13, 13 ]
|
116
120
|
|
117
121
|
racc_action_pointer = [
|
118
|
-
|
119
|
-
nil,
|
120
|
-
nil,
|
121
|
-
30, 65, nil, nil,
|
122
|
-
|
123
|
-
nil,
|
124
|
-
nil, nil, nil,
|
125
|
-
|
126
|
-
nil, nil, nil, nil, nil,
|
127
|
-
nil, -
|
128
|
-
|
129
|
-
nil, -4, nil, nil, nil ]
|
122
|
+
133, 66, nil, 76, nil, nil, nil, 165, nil, 88,
|
123
|
+
nil, nil, nil, 180, nil, nil, 49, nil, 37, nil,
|
124
|
+
nil, nil, 99, nil, nil, nil, nil, 0, 124, 12,
|
125
|
+
nil, 30, 65, nil, nil, 52, 155, 68, 38, nil,
|
126
|
+
150, 36, 170, 45, 92, 43, 14, nil, 175, 32,
|
127
|
+
32, nil, 82, nil, 15, nil, 19, nil, 3, nil,
|
128
|
+
-13, nil, nil, nil, 21, nil, nil, 13, nil, nil,
|
129
|
+
28, nil, 26, 27, 109, 30, nil, nil, nil, nil,
|
130
|
+
nil, nil, nil, nil, nil, nil, 160, 60, 139, nil,
|
131
|
+
nil, nil, -5, nil, 119, nil, nil, nil, 44, nil,
|
132
|
+
nil, 145, nil, 60, nil, nil, 12, 2, nil, nil,
|
133
|
+
nil, nil, -4, nil, nil, nil ]
|
130
134
|
|
131
135
|
racc_action_default = [
|
132
|
-
-
|
133
|
-
-32, -33, -34, -35, -36, -
|
134
|
-
-21, -
|
135
|
-
-
|
136
|
-
-
|
137
|
-
-38, -
|
138
|
-
-7, -12, -14, -
|
139
|
-
-
|
140
|
-
-47, -48, -49, -50, -51, -
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
136
|
+
-73, -73, -1, -2, -3, -5, -6, -9, -8, -73,
|
137
|
+
-32, -33, -34, -35, -36, -37, -73, -4, -11, -10,
|
138
|
+
-35, -21, -73, -25, -27, -28, -29, -38, -64, -73,
|
139
|
+
116, -64, -73, -22, -26, -64, -73, -73, -65, -66,
|
140
|
+
-73, -64, -73, -73, -73, -73, -73, -13, -73, -23,
|
141
|
+
-38, -39, -73, -41, -73, -67, -38, -69, -64, -71,
|
142
|
+
-64, -7, -12, -14, -73, -24, -30, -64, -40, -42,
|
143
|
+
-73, -68, -73, -73, -73, -23, -43, -44, -45, -46,
|
144
|
+
-47, -48, -49, -50, -51, -52, -73, -73, -73, -63,
|
145
|
+
-70, -72, -19, -16, -73, -31, -53, -54, -73, -56,
|
146
|
+
-58, -73, -60, -73, -15, -17, -73, -73, -55, -57,
|
147
|
+
-59, -61, -73, -20, -18, -62 ]
|
144
148
|
|
145
149
|
racc_goto_table = [
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
54,
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
nil, nil, nil, nil, nil, nil, nil, nil,
|
154
|
-
|
155
|
-
nil, nil, nil,
|
150
|
+
19, 41, 27, 92, 76, 35, 29, 104, 22, 4,
|
151
|
+
66, 47, 17, 46, 31, 27, 18, 60, 1, 52,
|
152
|
+
59, 99, 61, 107, 43, 63, 65, 45, 67, 50,
|
153
|
+
54, 49, 109, 56, 71, 58, 95, 57, 53, 3,
|
154
|
+
113, 64, 102, 98, 23, 54, 115, 101, 2, 90,
|
155
|
+
91, 55, 65, 69, 72, 111, 73, 34, nil, nil,
|
156
|
+
nil, nil, nil, 75, nil, nil, nil, 93, nil, nil,
|
157
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 96,
|
158
|
+
nil, 103, nil, nil, nil, nil, nil, 93, nil, nil,
|
159
|
+
nil, nil, nil, nil, 103 ]
|
156
160
|
|
157
161
|
racc_goto_check = [
|
158
|
-
7,
|
159
|
-
|
160
|
-
|
161
|
-
7,
|
162
|
-
7,
|
163
|
-
|
164
|
-
|
165
|
-
nil, nil, nil, nil, nil, nil, nil, nil, 7,
|
166
|
-
7, nil, nil, nil, nil, nil, 7, nil, nil,
|
167
|
-
nil, nil, nil, 7 ]
|
162
|
+
7, 24, 7, 14, 16, 23, 7, 15, 17, 4,
|
163
|
+
18, 13, 4, 12, 9, 7, 8, 24, 1, 25,
|
164
|
+
11, 16, 11, 14, 10, 13, 11, 10, 23, 7,
|
165
|
+
7, 10, 16, 7, 23, 7, 18, 10, 26, 3,
|
166
|
+
16, 7, 33, 31, 19, 7, 16, 32, 2, 11,
|
167
|
+
11, 35, 11, 26, 10, 33, 10, 19, nil, nil,
|
168
|
+
nil, nil, nil, 10, nil, nil, nil, 7, nil, nil,
|
169
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 7,
|
170
|
+
nil, 7, nil, nil, nil, nil, nil, 7, nil, nil,
|
171
|
+
nil, nil, nil, nil, 7 ]
|
168
172
|
|
169
173
|
racc_goto_pointer = [
|
170
|
-
nil,
|
171
|
-
-
|
172
|
-
nil, nil, nil, -
|
173
|
-
-
|
174
|
+
nil, 18, 48, 39, 9, nil, nil, -7, 9, -4,
|
175
|
+
-4, -23, -19, -21, -71, -85, -66, -1, -39, 35,
|
176
|
+
nil, nil, nil, -22, -27, -18, 1, nil, nil, nil,
|
177
|
+
nil, -44, -41, -46, nil, 13 ]
|
174
178
|
|
175
179
|
racc_goto_default = [
|
176
180
|
nil, nil, nil, nil, nil, 5, 6, 7, nil, nil,
|
177
181
|
nil, 8, nil, nil, nil, nil, nil, nil, nil, nil,
|
178
|
-
|
179
|
-
nil, nil, nil, 38, 39 ]
|
182
|
+
24, 25, 26, nil, 10, nil, nil, 82, 83, 84,
|
183
|
+
85, nil, nil, nil, 38, 39 ]
|
180
184
|
|
181
185
|
racc_reduce_table = [
|
182
186
|
0, 0, :racc_error,
|
@@ -213,48 +217,49 @@ racc_reduce_table = [
|
|
213
217
|
6, 42, :_reduce_31,
|
214
218
|
1, 29, :_reduce_none,
|
215
219
|
1, 29, :_reduce_none,
|
216
|
-
1,
|
217
|
-
1,
|
218
|
-
1,
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
220
|
+
1, 46, :_reduce_none,
|
221
|
+
1, 46, :_reduce_none,
|
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,
|
226
230
|
1, 38, :_reduce_44,
|
227
231
|
1, 38, :_reduce_45,
|
228
232
|
1, 38, :_reduce_46,
|
229
233
|
1, 38, :_reduce_47,
|
234
|
+
1, 38, :_reduce_48,
|
230
235
|
1, 38, :_reduce_none,
|
231
236
|
1, 38, :_reduce_none,
|
232
237
|
1, 38, :_reduce_none,
|
233
238
|
1, 38, :_reduce_none,
|
234
|
-
2, 48, :_reduce_52,
|
235
239
|
2, 49, :_reduce_53,
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
2,
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
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,
|
246
251
|
1, 32, :_reduce_none,
|
247
|
-
1,
|
248
|
-
2,
|
249
|
-
3,
|
250
|
-
3, 43, :
|
251
|
-
5, 44, :
|
252
|
-
3, 44, :
|
253
|
-
6, 28, :
|
252
|
+
1, 56, :_reduce_66,
|
253
|
+
2, 56, :_reduce_67,
|
254
|
+
3, 57, :_reduce_68,
|
255
|
+
3, 43, :_reduce_69,
|
256
|
+
5, 44, :_reduce_70,
|
257
|
+
3, 44, :_reduce_71,
|
258
|
+
6, 28, :_reduce_72 ]
|
254
259
|
|
255
|
-
racc_reduce_n =
|
260
|
+
racc_reduce_n = 73
|
256
261
|
|
257
|
-
racc_shift_n =
|
262
|
+
racc_shift_n = 116
|
258
263
|
|
259
264
|
racc_token_table = {
|
260
265
|
false => 0,
|
@@ -269,11 +274,11 @@ racc_token_table = {
|
|
269
274
|
:EQUALS => 9,
|
270
275
|
:RCURLY => 10,
|
271
276
|
:LCURLY => 11,
|
272
|
-
:
|
273
|
-
:
|
274
|
-
:
|
275
|
-
:
|
276
|
-
:
|
277
|
+
:ON => 12,
|
278
|
+
:IDENTIFIER => 13,
|
279
|
+
:FRAGMENT => 14,
|
280
|
+
:TRUE => 15,
|
281
|
+
:FALSE => 16,
|
277
282
|
:FLOAT => 17,
|
278
283
|
:INT => 18,
|
279
284
|
:STRING => 19,
|
@@ -313,11 +318,11 @@ Racc_token_to_s_table = [
|
|
313
318
|
"EQUALS",
|
314
319
|
"RCURLY",
|
315
320
|
"LCURLY",
|
321
|
+
"ON",
|
316
322
|
"IDENTIFIER",
|
317
323
|
"FRAGMENT",
|
318
324
|
"TRUE",
|
319
325
|
"FALSE",
|
320
|
-
"ON",
|
321
326
|
"FLOAT",
|
322
327
|
"INT",
|
323
328
|
"STRING",
|
@@ -347,6 +352,7 @@ Racc_token_to_s_table = [
|
|
347
352
|
"fragment_spread",
|
348
353
|
"inline_fragment",
|
349
354
|
"arguments_opt",
|
355
|
+
"name_without_on",
|
350
356
|
"arguments_list",
|
351
357
|
"argument",
|
352
358
|
"variable",
|
@@ -598,84 +604,84 @@ module_eval(<<'.,.,', 'parser.y', 97)
|
|
598
604
|
|
599
605
|
# reduce 36 omitted
|
600
606
|
|
601
|
-
|
602
|
-
def _reduce_37(val, _values, result)
|
603
|
-
return []
|
604
|
-
result
|
605
|
-
end
|
606
|
-
.,.,
|
607
|
+
# reduce 37 omitted
|
607
608
|
|
608
|
-
module_eval(<<'.,.,', 'parser.y',
|
609
|
+
module_eval(<<'.,.,', 'parser.y', 120)
|
609
610
|
def _reduce_38(val, _values, result)
|
610
611
|
return []
|
611
612
|
result
|
612
613
|
end
|
613
614
|
.,.,
|
614
615
|
|
615
|
-
module_eval(<<'.,.,', 'parser.y',
|
616
|
+
module_eval(<<'.,.,', 'parser.y', 121)
|
616
617
|
def _reduce_39(val, _values, result)
|
617
|
-
return
|
618
|
+
return []
|
618
619
|
result
|
619
620
|
end
|
620
621
|
.,.,
|
621
622
|
|
622
623
|
module_eval(<<'.,.,', 'parser.y', 122)
|
623
624
|
def _reduce_40(val, _values, result)
|
624
|
-
return
|
625
|
+
return val[1]
|
625
626
|
result
|
626
627
|
end
|
627
628
|
.,.,
|
628
629
|
|
629
|
-
module_eval(<<'.,.,', 'parser.y',
|
630
|
+
module_eval(<<'.,.,', 'parser.y', 125)
|
630
631
|
def _reduce_41(val, _values, result)
|
631
|
-
val[0]
|
632
|
+
return [val[0]]
|
632
633
|
result
|
633
634
|
end
|
634
635
|
.,.,
|
635
636
|
|
636
637
|
module_eval(<<'.,.,', 'parser.y', 126)
|
637
638
|
def _reduce_42(val, _values, result)
|
638
|
-
|
639
|
+
val[0] << val[1]
|
639
640
|
result
|
640
641
|
end
|
641
642
|
.,.,
|
642
643
|
|
643
644
|
module_eval(<<'.,.,', 'parser.y', 129)
|
644
645
|
def _reduce_43(val, _values, result)
|
645
|
-
return val[0]
|
646
|
+
return make_node(:Argument, name: val[0], value: val[2], position_source: val[0])
|
646
647
|
result
|
647
648
|
end
|
648
649
|
.,.,
|
649
650
|
|
650
|
-
module_eval(<<'.,.,', 'parser.y',
|
651
|
+
module_eval(<<'.,.,', 'parser.y', 132)
|
651
652
|
def _reduce_44(val, _values, result)
|
652
|
-
return val[0].
|
653
|
+
return val[0].to_f
|
653
654
|
result
|
654
655
|
end
|
655
656
|
.,.,
|
656
657
|
|
657
|
-
module_eval(<<'.,.,', 'parser.y',
|
658
|
+
module_eval(<<'.,.,', 'parser.y', 133)
|
658
659
|
def _reduce_45(val, _values, result)
|
659
|
-
return val[0].
|
660
|
+
return val[0].to_i
|
660
661
|
result
|
661
662
|
end
|
662
663
|
.,.,
|
663
664
|
|
664
|
-
module_eval(<<'.,.,', 'parser.y',
|
665
|
+
module_eval(<<'.,.,', 'parser.y', 134)
|
665
666
|
def _reduce_46(val, _values, result)
|
666
|
-
return
|
667
|
+
return val[0].to_s
|
667
668
|
result
|
668
669
|
end
|
669
670
|
.,.,
|
670
671
|
|
671
|
-
module_eval(<<'.,.,', 'parser.y',
|
672
|
+
module_eval(<<'.,.,', 'parser.y', 135)
|
672
673
|
def _reduce_47(val, _values, result)
|
673
|
-
return
|
674
|
+
return true
|
674
675
|
result
|
675
676
|
end
|
676
677
|
.,.,
|
677
678
|
|
678
|
-
|
679
|
+
module_eval(<<'.,.,', 'parser.y', 136)
|
680
|
+
def _reduce_48(val, _values, result)
|
681
|
+
return false
|
682
|
+
result
|
683
|
+
end
|
684
|
+
.,.,
|
679
685
|
|
680
686
|
# reduce 49 omitted
|
681
687
|
|
@@ -683,122 +689,124 @@ module_eval(<<'.,.,', 'parser.y', 133)
|
|
683
689
|
|
684
690
|
# reduce 51 omitted
|
685
691
|
|
686
|
-
|
687
|
-
def _reduce_52(val, _values, result)
|
688
|
-
return make_node(:VariableIdentifier, name: val[1], position_source: val[0])
|
689
|
-
result
|
690
|
-
end
|
691
|
-
.,.,
|
692
|
+
# reduce 52 omitted
|
692
693
|
|
693
694
|
module_eval(<<'.,.,', 'parser.y', 142)
|
694
695
|
def _reduce_53(val, _values, result)
|
695
|
-
return []
|
696
|
+
return make_node(:VariableIdentifier, name: val[1], position_source: val[0])
|
696
697
|
result
|
697
698
|
end
|
698
699
|
.,.,
|
699
700
|
|
700
|
-
module_eval(<<'.,.,', 'parser.y',
|
701
|
+
module_eval(<<'.,.,', 'parser.y', 145)
|
701
702
|
def _reduce_54(val, _values, result)
|
702
|
-
return
|
703
|
+
return []
|
703
704
|
result
|
704
705
|
end
|
705
706
|
.,.,
|
706
707
|
|
707
708
|
module_eval(<<'.,.,', 'parser.y', 146)
|
708
709
|
def _reduce_55(val, _values, result)
|
709
|
-
return
|
710
|
+
return val[1]
|
710
711
|
result
|
711
712
|
end
|
712
713
|
.,.,
|
713
714
|
|
714
|
-
module_eval(<<'.,.,', 'parser.y',
|
715
|
+
module_eval(<<'.,.,', 'parser.y', 149)
|
715
716
|
def _reduce_56(val, _values, result)
|
716
|
-
val[0]
|
717
|
+
return [val[0]]
|
717
718
|
result
|
718
719
|
end
|
719
720
|
.,.,
|
720
721
|
|
721
722
|
module_eval(<<'.,.,', 'parser.y', 150)
|
722
723
|
def _reduce_57(val, _values, result)
|
723
|
-
|
724
|
+
val[0] << val[1]
|
724
725
|
result
|
725
726
|
end
|
726
727
|
.,.,
|
727
728
|
|
728
|
-
module_eval(<<'.,.,', 'parser.y',
|
729
|
+
module_eval(<<'.,.,', 'parser.y', 153)
|
729
730
|
def _reduce_58(val, _values, result)
|
730
|
-
return make_node(:InputObject, arguments:
|
731
|
+
return make_node(:InputObject, arguments: [], position_source: val[0])
|
731
732
|
result
|
732
733
|
end
|
733
734
|
.,.,
|
734
735
|
|
735
736
|
module_eval(<<'.,.,', 'parser.y', 154)
|
736
737
|
def _reduce_59(val, _values, result)
|
737
|
-
return [val[0]
|
738
|
+
return make_node(:InputObject, arguments: val[1], position_source: val[0])
|
738
739
|
result
|
739
740
|
end
|
740
741
|
.,.,
|
741
742
|
|
742
|
-
module_eval(<<'.,.,', 'parser.y',
|
743
|
+
module_eval(<<'.,.,', 'parser.y', 157)
|
743
744
|
def _reduce_60(val, _values, result)
|
744
|
-
val[0]
|
745
|
+
return [val[0]]
|
745
746
|
result
|
746
747
|
end
|
747
748
|
.,.,
|
748
749
|
|
749
750
|
module_eval(<<'.,.,', 'parser.y', 158)
|
750
751
|
def _reduce_61(val, _values, result)
|
751
|
-
|
752
|
+
val[0] << val[1]
|
752
753
|
result
|
753
754
|
end
|
754
755
|
.,.,
|
755
756
|
|
756
|
-
module_eval(<<'.,.,', 'parser.y',
|
757
|
+
module_eval(<<'.,.,', 'parser.y', 161)
|
757
758
|
def _reduce_62(val, _values, result)
|
758
|
-
return make_node(:
|
759
|
+
return make_node(:Argument, name: val[0], value: val[2], position_source: val[0])
|
759
760
|
result
|
760
761
|
end
|
761
762
|
.,.,
|
762
763
|
|
763
764
|
module_eval(<<'.,.,', 'parser.y', 163)
|
764
765
|
def _reduce_63(val, _values, result)
|
766
|
+
return make_node(:Enum, name: val[0], position_source: val[0])
|
767
|
+
result
|
768
|
+
end
|
769
|
+
.,.,
|
770
|
+
|
771
|
+
module_eval(<<'.,.,', 'parser.y', 166)
|
772
|
+
def _reduce_64(val, _values, result)
|
765
773
|
return []
|
766
774
|
result
|
767
775
|
end
|
768
776
|
.,.,
|
769
777
|
|
770
|
-
# reduce
|
778
|
+
# reduce 65 omitted
|
771
779
|
|
772
|
-
module_eval(<<'.,.,', 'parser.y',
|
773
|
-
def
|
780
|
+
module_eval(<<'.,.,', 'parser.y', 170)
|
781
|
+
def _reduce_66(val, _values, result)
|
774
782
|
return [val[0]]
|
775
783
|
result
|
776
784
|
end
|
777
785
|
.,.,
|
778
786
|
|
779
|
-
module_eval(<<'.,.,', 'parser.y',
|
780
|
-
def
|
787
|
+
module_eval(<<'.,.,', 'parser.y', 171)
|
788
|
+
def _reduce_67(val, _values, result)
|
781
789
|
val[0] << val[1]
|
782
790
|
result
|
783
791
|
end
|
784
792
|
.,.,
|
785
793
|
|
786
|
-
module_eval(<<'.,.,', 'parser.y',
|
787
|
-
def
|
794
|
+
module_eval(<<'.,.,', 'parser.y', 173)
|
795
|
+
def _reduce_68(val, _values, result)
|
788
796
|
return make_node(:Directive, name: val[1], arguments: val[2], position_source: val[0])
|
789
797
|
result
|
790
798
|
end
|
791
799
|
.,.,
|
792
800
|
|
793
|
-
module_eval(<<'.,.,', 'parser.y',
|
794
|
-
def
|
801
|
+
module_eval(<<'.,.,', 'parser.y', 176)
|
802
|
+
def _reduce_69(val, _values, result)
|
795
803
|
return make_node(:FragmentSpread, name: val[1], directives: val[2], position_source: val[0])
|
796
804
|
result
|
797
805
|
end
|
798
806
|
.,.,
|
799
807
|
|
800
|
-
module_eval(<<'.,.,', 'parser.y',
|
801
|
-
def
|
808
|
+
module_eval(<<'.,.,', 'parser.y', 180)
|
809
|
+
def _reduce_70(val, _values, result)
|
802
810
|
return make_node(:InlineFragment, {
|
803
811
|
type: val[2],
|
804
812
|
directives: val[3],
|
@@ -810,8 +818,8 @@ module_eval(<<'.,.,', 'parser.y', 177)
|
|
810
818
|
end
|
811
819
|
.,.,
|
812
820
|
|
813
|
-
module_eval(<<'.,.,', 'parser.y',
|
814
|
-
def
|
821
|
+
module_eval(<<'.,.,', 'parser.y', 188)
|
822
|
+
def _reduce_71(val, _values, result)
|
815
823
|
return make_node(:InlineFragment, {
|
816
824
|
type: nil,
|
817
825
|
directives: val[1],
|
@@ -823,8 +831,8 @@ module_eval(<<'.,.,', 'parser.y', 185)
|
|
823
831
|
end
|
824
832
|
.,.,
|
825
833
|
|
826
|
-
module_eval(<<'.,.,', 'parser.y',
|
827
|
-
def
|
834
|
+
module_eval(<<'.,.,', 'parser.y', 198)
|
835
|
+
def _reduce_72(val, _values, result)
|
828
836
|
return make_node(:FragmentDefinition, {
|
829
837
|
name: val[1],
|
830
838
|
type: val[3],
|