graphql 1.9.0.pre1 → 1.9.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql.rb +5 -1
- data/lib/graphql/analysis/ast/analyzer.rb +1 -1
- data/lib/graphql/analysis/ast/visitor.rb +6 -1
- data/lib/graphql/backwards_compatibility.rb +1 -1
- data/lib/graphql/dig.rb +19 -0
- data/lib/graphql/directive.rb +13 -1
- data/lib/graphql/directive/include_directive.rb +1 -7
- data/lib/graphql/directive/skip_directive.rb +1 -8
- data/lib/graphql/execution/interpreter.rb +23 -13
- data/lib/graphql/execution/interpreter/resolve.rb +56 -0
- data/lib/graphql/execution/interpreter/runtime.rb +174 -74
- data/lib/graphql/execution/lazy.rb +7 -1
- data/lib/graphql/execution/lookahead.rb +71 -6
- data/lib/graphql/execution_error.rb +1 -1
- data/lib/graphql/introspection/entry_points.rb +5 -1
- data/lib/graphql/introspection/type_type.rb +4 -4
- data/lib/graphql/language.rb +0 -1
- data/lib/graphql/language/block_string.rb +37 -0
- data/lib/graphql/language/document_from_schema_definition.rb +1 -1
- data/lib/graphql/language/lexer.rb +55 -36
- data/lib/graphql/language/lexer.rl +8 -3
- data/lib/graphql/language/nodes.rb +27 -4
- data/lib/graphql/language/parser.rb +55 -55
- data/lib/graphql/language/parser.y +11 -11
- data/lib/graphql/language/printer.rb +1 -1
- data/lib/graphql/language/visitor.rb +22 -13
- data/lib/graphql/literal_validation_error.rb +6 -0
- data/lib/graphql/query.rb +13 -0
- data/lib/graphql/query/arguments.rb +2 -1
- data/lib/graphql/query/context.rb +3 -10
- data/lib/graphql/query/executor.rb +1 -1
- data/lib/graphql/query/validation_pipeline.rb +1 -1
- data/lib/graphql/relay/connection_resolve.rb +1 -1
- data/lib/graphql/relay/relation_connection.rb +1 -1
- data/lib/graphql/schema.rb +81 -11
- data/lib/graphql/schema/argument.rb +1 -1
- data/lib/graphql/schema/build_from_definition.rb +2 -4
- data/lib/graphql/schema/directive.rb +103 -0
- data/lib/graphql/schema/directive/feature.rb +66 -0
- data/lib/graphql/schema/directive/include.rb +25 -0
- data/lib/graphql/schema/directive/skip.rb +25 -0
- data/lib/graphql/schema/directive/transform.rb +48 -0
- data/lib/graphql/schema/enum_value.rb +2 -2
- data/lib/graphql/schema/field.rb +63 -17
- data/lib/graphql/schema/input_object.rb +1 -0
- data/lib/graphql/schema/member/base_dsl_methods.rb +4 -2
- data/lib/graphql/schema/member/build_type.rb +33 -1
- data/lib/graphql/schema/member/has_fields.rb +8 -73
- data/lib/graphql/schema/relay_classic_mutation.rb +6 -1
- data/lib/graphql/schema/resolver.rb +1 -1
- data/lib/graphql/static_validation.rb +2 -1
- data/lib/graphql/static_validation/all_rules.rb +1 -0
- data/lib/graphql/static_validation/base_visitor.rb +25 -10
- data/lib/graphql/static_validation/definition_dependencies.rb +3 -3
- data/lib/graphql/static_validation/{message.rb → error.rb} +11 -11
- data/lib/graphql/static_validation/interpreter_visitor.rb +14 -0
- data/lib/graphql/static_validation/literal_validator.rb +54 -11
- data/lib/graphql/static_validation/rules/argument_literals_are_compatible.rb +34 -5
- data/lib/graphql/static_validation/rules/argument_literals_are_compatible_error.rb +31 -0
- data/lib/graphql/static_validation/rules/argument_names_are_unique.rb +2 -2
- data/lib/graphql/static_validation/rules/argument_names_are_unique_error.rb +30 -0
- data/lib/graphql/static_validation/rules/arguments_are_defined.rb +7 -1
- data/lib/graphql/static_validation/rules/arguments_are_defined_error.rb +35 -0
- data/lib/graphql/static_validation/rules/directives_are_defined.rb +5 -1
- data/lib/graphql/static_validation/rules/directives_are_defined_error.rb +29 -0
- data/lib/graphql/static_validation/rules/directives_are_in_valid_locations.rb +11 -2
- data/lib/graphql/static_validation/rules/directives_are_in_valid_locations_error.rb +31 -0
- data/lib/graphql/static_validation/rules/fields_are_defined_on_type.rb +11 -2
- data/lib/graphql/static_validation/rules/fields_are_defined_on_type_error.rb +32 -0
- data/lib/graphql/static_validation/rules/fields_have_appropriate_selections.rb +14 -2
- data/lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb +31 -0
- data/lib/graphql/static_validation/rules/fields_will_merge.rb +24 -6
- data/lib/graphql/static_validation/rules/fields_will_merge_error.rb +32 -0
- data/lib/graphql/static_validation/rules/fragment_names_are_unique.rb +5 -1
- data/lib/graphql/static_validation/rules/fragment_names_are_unique_error.rb +29 -0
- data/lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb +8 -1
- data/lib/graphql/static_validation/rules/fragment_spreads_are_possible_error.rb +35 -0
- data/lib/graphql/static_validation/rules/fragment_types_exist.rb +5 -1
- data/lib/graphql/static_validation/rules/fragment_types_exist_error.rb +29 -0
- data/lib/graphql/static_validation/rules/fragments_are_finite.rb +6 -1
- data/lib/graphql/static_validation/rules/fragments_are_finite_error.rb +29 -0
- data/lib/graphql/static_validation/rules/fragments_are_named.rb +4 -1
- data/lib/graphql/static_validation/rules/fragments_are_named_error.rb +26 -0
- data/lib/graphql/static_validation/rules/fragments_are_on_composite_types.rb +5 -1
- data/lib/graphql/static_validation/rules/fragments_are_on_composite_types_error.rb +30 -0
- data/lib/graphql/static_validation/rules/fragments_are_used.rb +13 -3
- data/lib/graphql/static_validation/rules/fragments_are_used_error.rb +29 -0
- data/lib/graphql/static_validation/rules/mutation_root_exists.rb +4 -1
- data/lib/graphql/static_validation/rules/mutation_root_exists_error.rb +26 -0
- data/lib/graphql/static_validation/rules/no_definitions_are_present.rb +2 -2
- data/lib/graphql/static_validation/rules/no_definitions_are_present_error.rb +25 -0
- data/lib/graphql/static_validation/rules/operation_names_are_valid.rb +9 -2
- data/lib/graphql/static_validation/rules/operation_names_are_valid_error.rb +28 -0
- data/lib/graphql/static_validation/rules/required_arguments_are_present.rb +7 -1
- data/lib/graphql/static_validation/rules/required_arguments_are_present_error.rb +35 -0
- data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb +47 -0
- data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present_error.rb +35 -0
- data/lib/graphql/static_validation/rules/subscription_root_exists.rb +4 -1
- data/lib/graphql/static_validation/rules/subscription_root_exists_error.rb +26 -0
- data/lib/graphql/static_validation/rules/unique_directives_per_location.rb +4 -3
- data/lib/graphql/static_validation/rules/unique_directives_per_location_error.rb +29 -0
- data/lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed.rb +20 -6
- data/lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed_error.rb +39 -0
- data/lib/graphql/static_validation/rules/variable_names_are_unique.rb +5 -1
- data/lib/graphql/static_validation/rules/variable_names_are_unique_error.rb +29 -0
- data/lib/graphql/static_validation/rules/variable_usages_are_allowed.rb +8 -1
- data/lib/graphql/static_validation/rules/variable_usages_are_allowed_error.rb +38 -0
- data/lib/graphql/static_validation/rules/variables_are_input_types.rb +12 -2
- data/lib/graphql/static_validation/rules/variables_are_input_types_error.rb +32 -0
- data/lib/graphql/static_validation/rules/variables_are_used_and_defined.rb +18 -2
- data/lib/graphql/static_validation/rules/variables_are_used_and_defined_error.rb +37 -0
- data/lib/graphql/static_validation/validator.rb +24 -14
- data/lib/graphql/tracing/new_relic_tracing.rb +2 -2
- data/lib/graphql/tracing/skylight_tracing.rb +2 -2
- data/lib/graphql/unauthorized_field_error.rb +23 -0
- data/lib/graphql/version.rb +1 -1
- data/spec/graphql/analysis/ast_spec.rb +40 -0
- data/spec/graphql/authorization_spec.rb +93 -20
- data/spec/graphql/base_type_spec.rb +3 -1
- data/spec/graphql/execution/interpreter_spec.rb +127 -4
- data/spec/graphql/execution/lazy_spec.rb +49 -0
- data/spec/graphql/execution/lookahead_spec.rb +113 -21
- data/spec/graphql/execution/multiplex_spec.rb +2 -1
- data/spec/graphql/introspection/type_type_spec.rb +1 -1
- data/spec/graphql/language/lexer_spec.rb +72 -3
- data/spec/graphql/language/printer_spec.rb +18 -6
- data/spec/graphql/query/arguments_spec.rb +21 -0
- data/spec/graphql/query/context_spec.rb +10 -0
- data/spec/graphql/schema/build_from_definition_spec.rb +144 -29
- data/spec/graphql/schema/directive/feature_spec.rb +81 -0
- data/spec/graphql/schema/directive/transform_spec.rb +39 -0
- data/spec/graphql/schema/enum_spec.rb +5 -3
- data/spec/graphql/schema/field_extension_spec.rb +3 -3
- data/spec/graphql/schema/field_spec.rb +19 -0
- data/spec/graphql/schema/input_object_spec.rb +81 -0
- data/spec/graphql/schema/member/build_type_spec.rb +46 -0
- data/spec/graphql/schema/member/scoped_spec.rb +3 -3
- data/spec/graphql/schema/printer_spec.rb +244 -96
- data/spec/graphql/schema/relay_classic_mutation_spec.rb +26 -0
- data/spec/graphql/schema/resolver_spec.rb +1 -1
- data/spec/graphql/schema/warden_spec.rb +35 -11
- data/spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb +212 -72
- data/spec/graphql/static_validation/rules/argument_names_are_unique_spec.rb +2 -2
- data/spec/graphql/static_validation/rules/arguments_are_defined_spec.rb +72 -29
- data/spec/graphql/static_validation/rules/directives_are_defined_spec.rb +4 -2
- data/spec/graphql/static_validation/rules/directives_are_in_valid_locations_spec.rb +4 -2
- data/spec/graphql/static_validation/rules/fields_are_defined_on_type_spec.rb +10 -5
- data/spec/graphql/static_validation/rules/fields_have_appropriate_selections_spec.rb +10 -5
- data/spec/graphql/static_validation/rules/fields_will_merge_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/fragment_names_are_unique_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/fragment_spreads_are_possible_spec.rb +6 -3
- data/spec/graphql/static_validation/rules/fragment_types_exist_spec.rb +4 -2
- data/spec/graphql/static_validation/rules/fragments_are_finite_spec.rb +4 -2
- data/spec/graphql/static_validation/rules/fragments_are_named_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/fragments_are_on_composite_types_spec.rb +6 -3
- data/spec/graphql/static_validation/rules/fragments_are_used_spec.rb +22 -2
- data/spec/graphql/static_validation/rules/mutation_root_exists_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/operation_names_are_valid_spec.rb +6 -3
- data/spec/graphql/static_validation/rules/required_arguments_are_present_spec.rb +13 -4
- data/spec/graphql/static_validation/rules/required_input_object_attributes_are_present_spec.rb +58 -0
- data/spec/graphql/static_validation/rules/subscription_root_exists_spec.rb +2 -1
- data/spec/graphql/static_validation/rules/unique_directives_per_location_spec.rb +14 -7
- data/spec/graphql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb +14 -7
- data/spec/graphql/static_validation/rules/variable_usages_are_allowed_spec.rb +8 -4
- data/spec/graphql/static_validation/rules/variables_are_input_types_spec.rb +8 -4
- data/spec/graphql/static_validation/rules/variables_are_used_and_defined_spec.rb +6 -3
- data/spec/graphql/static_validation/validator_spec.rb +6 -4
- data/spec/graphql/tracing/new_relic_tracing_spec.rb +10 -0
- data/spec/graphql/tracing/skylight_tracing_spec.rb +10 -0
- data/spec/graphql/types/iso_8601_date_time_spec.rb +1 -2
- data/spec/integration/mongoid/star_trek/schema.rb +5 -5
- data/spec/integration/rails/graphql/relay/relation_connection_spec.rb +37 -8
- data/spec/integration/rails/graphql/schema_spec.rb +2 -2
- data/spec/integration/rails/spec_helper.rb +10 -0
- data/spec/integration/tmp/app/graphql/types/bird_type.rb +7 -0
- data/spec/integration/tmp/dummy/Gemfile +45 -0
- data/spec/integration/tmp/dummy/README.rdoc +28 -0
- data/spec/integration/tmp/dummy/Rakefile +6 -0
- data/spec/integration/tmp/dummy/app/assets/javascripts/application.js +16 -0
- data/spec/integration/tmp/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/integration/tmp/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/integration/tmp/dummy/app/controllers/graphql_controller.rb +43 -0
- data/spec/integration/tmp/dummy/app/graphql/dummy_schema.rb +34 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_enum.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_input_object.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_interface.rb +5 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_object.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_scalar.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/base_union.rb +4 -0
- data/spec/integration/tmp/dummy/app/graphql/types/mutation_type.rb +10 -0
- data/spec/integration/tmp/dummy/app/graphql/types/query_type.rb +15 -0
- data/spec/integration/tmp/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/integration/tmp/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/integration/tmp/dummy/bin/bundle +3 -0
- data/spec/integration/tmp/dummy/bin/rails +4 -0
- data/spec/integration/tmp/dummy/bin/rake +4 -0
- data/spec/integration/tmp/dummy/bin/setup +29 -0
- data/spec/integration/tmp/dummy/config.ru +4 -0
- data/spec/integration/tmp/dummy/config/application.rb +32 -0
- data/spec/integration/tmp/dummy/config/boot.rb +3 -0
- data/spec/integration/tmp/dummy/config/environment.rb +5 -0
- data/spec/integration/tmp/dummy/config/environments/development.rb +38 -0
- data/spec/integration/tmp/dummy/config/environments/production.rb +76 -0
- data/spec/integration/tmp/dummy/config/environments/test.rb +42 -0
- data/spec/integration/tmp/dummy/config/initializers/assets.rb +11 -0
- data/spec/integration/tmp/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/integration/tmp/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/integration/tmp/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/integration/tmp/dummy/config/initializers/inflections.rb +16 -0
- data/spec/integration/tmp/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/integration/tmp/dummy/config/initializers/session_store.rb +3 -0
- data/spec/integration/tmp/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
- data/spec/integration/tmp/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/spec/integration/tmp/dummy/config/locales/en.yml +23 -0
- data/spec/integration/tmp/dummy/config/routes.rb +61 -0
- data/spec/integration/tmp/dummy/config/secrets.yml +22 -0
- data/spec/integration/tmp/dummy/db/seeds.rb +7 -0
- data/spec/integration/tmp/dummy/public/404.html +67 -0
- data/spec/integration/tmp/dummy/public/422.html +67 -0
- data/spec/integration/tmp/dummy/public/500.html +66 -0
- data/spec/integration/tmp/dummy/public/favicon.ico +0 -0
- data/spec/integration/tmp/dummy/public/robots.txt +5 -0
- data/spec/support/dummy/schema.rb +2 -2
- data/spec/support/error_bubbling_helpers.rb +23 -0
- data/spec/support/jazz.rb +53 -6
- data/spec/support/lazy_helpers.rb +26 -8
- data/spec/support/new_relic.rb +3 -0
- data/spec/support/skylight.rb +3 -0
- data/spec/support/star_wars/schema.rb +13 -9
- data/spec/support/static_validation_helpers.rb +3 -1
- metadata +145 -22
- data/lib/graphql/language/comments.rb +0 -45
- data/spec/graphql/schema/member/has_fields_spec.rb +0 -132
- data/spec/integration/tmp/app/graphql/types/family_type.rb +0 -9
@@ -20,11 +20,17 @@ module GraphQL
|
|
20
20
|
Resolve.resolve(val)
|
21
21
|
end
|
22
22
|
|
23
|
+
attr_reader :path, :field
|
24
|
+
|
23
25
|
# Create a {Lazy} which will get its inner value by calling the block
|
26
|
+
# @param path [Array<String, Integer>]
|
27
|
+
# @param field [GraphQL::Schema::Field]
|
24
28
|
# @param get_value_func [Proc] a block to get the inner value (later)
|
25
|
-
def initialize(&get_value_func)
|
29
|
+
def initialize(path: nil, field: nil, &get_value_func)
|
26
30
|
@get_value_func = get_value_func
|
27
31
|
@resolved = false
|
32
|
+
@path = path
|
33
|
+
@field = field
|
28
34
|
end
|
29
35
|
|
30
36
|
# @return [Object] The wrapped value, calling the lazy block if necessary
|
@@ -36,12 +36,18 @@ module GraphQL
|
|
36
36
|
# @param field [GraphQL::Schema::Field] if `ast_nodes` are fields, this is the field definition matching those nodes
|
37
37
|
# @param root_type [Class] if `ast_nodes` are operation definition, this is the root type for that operation
|
38
38
|
def initialize(query:, ast_nodes:, field: nil, root_type: nil)
|
39
|
-
@ast_nodes = ast_nodes
|
39
|
+
@ast_nodes = ast_nodes.freeze
|
40
40
|
@field = field
|
41
41
|
@root_type = root_type
|
42
42
|
@query = query
|
43
43
|
end
|
44
44
|
|
45
|
+
# @return [Array<GraphQL::Language::Nodes::Field>]
|
46
|
+
attr_reader :ast_nodes
|
47
|
+
|
48
|
+
# @return [GraphQL::Schema::Field]
|
49
|
+
attr_reader :field
|
50
|
+
|
45
51
|
# True if this node has a selection on `field_name`.
|
46
52
|
# If `field_name` is a String, it is treated as a GraphQL-style (camelized)
|
47
53
|
# field name and used verbatim. If `field_name` is a Symbol, it is
|
@@ -94,6 +100,45 @@ module GraphQL
|
|
94
100
|
end
|
95
101
|
end
|
96
102
|
|
103
|
+
# Like {#selection}, but for all nodes.
|
104
|
+
# It returns a list of Lookaheads for all Selections
|
105
|
+
#
|
106
|
+
# If `arguments:` is provided, each provided key/value will be matched
|
107
|
+
# against the arguments in each selection. This method will filter the selections
|
108
|
+
# if any of the given `arguments:` do not match the given selection.
|
109
|
+
#
|
110
|
+
# @example getting the name of a selection
|
111
|
+
# def articles(lookahead:)
|
112
|
+
# next_lookaheads = lookahead.selections # => [#<GraphQL::Execution::Lookahead ...>, ...]
|
113
|
+
# next_lookaheads.map(&:name) #=> [:full_content, :title]
|
114
|
+
# end
|
115
|
+
#
|
116
|
+
# @param arguments [Hash] Arguments which must match in the selection
|
117
|
+
# @return [Array<GraphQL::Execution::Lookahead>]
|
118
|
+
def selections(arguments: nil)
|
119
|
+
subselections_by_name = {}
|
120
|
+
@ast_nodes.each do |node|
|
121
|
+
find_selections(subselections_by_name, node.selections, arguments)
|
122
|
+
end
|
123
|
+
|
124
|
+
# Items may be filtered out if `arguments` doesn't match
|
125
|
+
subselections_by_name.values.select(&:selected?)
|
126
|
+
end
|
127
|
+
|
128
|
+
# The method name of the field.
|
129
|
+
# It returns the method_sym of the Lookahead's field.
|
130
|
+
#
|
131
|
+
# @example getting the name of a selection
|
132
|
+
# def articles(lookahead:)
|
133
|
+
# article.selection(:full_content).name # => :full_content
|
134
|
+
# # ...
|
135
|
+
# end
|
136
|
+
#
|
137
|
+
# @return [Symbol]
|
138
|
+
def name
|
139
|
+
@field && @field.original_name
|
140
|
+
end
|
141
|
+
|
97
142
|
# This is returned for {Lookahead#selection} when a non-existent field is passed
|
98
143
|
class NullLookahead < Lookahead
|
99
144
|
# No inputs required here.
|
@@ -111,6 +156,10 @@ module GraphQL
|
|
111
156
|
def selection(*)
|
112
157
|
NULL_LOOKAHEAD
|
113
158
|
end
|
159
|
+
|
160
|
+
def selections(*)
|
161
|
+
[]
|
162
|
+
end
|
114
163
|
end
|
115
164
|
|
116
165
|
# A singleton, so that misses don't come with overhead.
|
@@ -135,6 +184,22 @@ module GraphQL
|
|
135
184
|
end
|
136
185
|
end
|
137
186
|
|
187
|
+
def find_selections(subselections_by_name, ast_selections, arguments)
|
188
|
+
ast_selections.each do |ast_selection|
|
189
|
+
case ast_selection
|
190
|
+
when GraphQL::Language::Nodes::Field
|
191
|
+
subselections_by_name[ast_selection.name] ||= selection(ast_selection.name, arguments: arguments)
|
192
|
+
when GraphQL::Language::Nodes::InlineFragment
|
193
|
+
find_selections(subselections_by_name, ast_selection.selections, arguments)
|
194
|
+
when GraphQL::Language::Nodes::FragmentSpread
|
195
|
+
frag_defn = @query.fragments[ast_selection.name] || raise("Invariant: Can't look ahead to nonexistent fragment #{ast_selection.name} (found: #{@query.fragments.keys})")
|
196
|
+
find_selections(subselections_by_name, frag_defn.selections, arguments)
|
197
|
+
else
|
198
|
+
raise "Invariant: Unexpected selection type: #{ast_selection.class}"
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
138
203
|
# If a selection on `node` matches `field_name` (which is backed by `field_defn`)
|
139
204
|
# and matches the `arguments:` constraints, then add that node to `matches`
|
140
205
|
def find_selected_nodes(node, field_name, field_defn, arguments:, matches:)
|
@@ -157,10 +222,10 @@ module GraphQL
|
|
157
222
|
end
|
158
223
|
end
|
159
224
|
when GraphQL::Language::Nodes::InlineFragment
|
160
|
-
node.selections.
|
225
|
+
node.selections.each { |s| find_selected_nodes(s, field_name, field_defn, arguments: arguments, matches: matches) }
|
161
226
|
when GraphQL::Language::Nodes::FragmentSpread
|
162
|
-
frag_defn = @query.fragments[node.name]
|
163
|
-
frag_defn.selections.
|
227
|
+
frag_defn = @query.fragments[node.name] || raise("Invariant: Can't look ahead to nonexistent fragment #{node.name} (found: #{@query.fragments.keys})")
|
228
|
+
frag_defn.selections.each { |s| find_selected_nodes(s, field_name, field_defn, arguments: arguments, matches: matches) }
|
164
229
|
else
|
165
230
|
raise "Unexpected selection comparison on #{node.class.name} (#{node})"
|
166
231
|
end
|
@@ -259,14 +324,14 @@ module GraphQL
|
|
259
324
|
module FieldHelpers
|
260
325
|
module_function
|
261
326
|
|
262
|
-
def get_field(schema, owner_type, field_name
|
327
|
+
def get_field(schema, owner_type, field_name)
|
263
328
|
field_defn = owner_type.get_field(field_name)
|
264
329
|
field_defn ||= if owner_type == schema.query.metadata[:type_class] && (entry_point_field = schema.introspection_system.entry_point(name: field_name))
|
265
330
|
entry_point_field.metadata[:type_class]
|
266
331
|
elsif (dynamic_field = schema.introspection_system.dynamic_field(name: field_name))
|
267
332
|
dynamic_field.metadata[:type_class]
|
268
333
|
else
|
269
|
-
|
334
|
+
nil
|
270
335
|
end
|
271
336
|
|
272
337
|
field_defn
|
@@ -4,7 +4,7 @@ module GraphQL
|
|
4
4
|
# the error will be inserted into the response's `"errors"` key
|
5
5
|
# and the field will resolve to `nil`.
|
6
6
|
class ExecutionError < GraphQL::Error
|
7
|
-
# @return [GraphQL::Language::Nodes::Field] the field where the error
|
7
|
+
# @return [GraphQL::Language::Nodes::Field] the field where the error occurred
|
8
8
|
attr_accessor :ast_node
|
9
9
|
|
10
10
|
# @return [String] an array describing the JSON-path into the execution
|
@@ -15,8 +15,12 @@ module GraphQL
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def __type(name:)
|
18
|
-
# This will probably break with non-Interpreter runtime
|
19
18
|
type = context.warden.get_type(name)
|
19
|
+
|
20
|
+
if type && context.interpreter?
|
21
|
+
type = type.metadata[:type_class] || raise("Invariant: interpreter requires class-based type for #{name}")
|
22
|
+
end
|
23
|
+
|
20
24
|
# The interpreter provides this wrapping, other execution doesnt, so support both.
|
21
25
|
if type && !context.interpreter?
|
22
26
|
# Apply wrapping manually since this field isn't wrapped by instrumentation
|
@@ -49,7 +49,7 @@ module GraphQL
|
|
49
49
|
|
50
50
|
def interfaces
|
51
51
|
if @object.kind == GraphQL::TypeKinds::OBJECT
|
52
|
-
@context.warden.interfaces(@object)
|
52
|
+
@context.warden.interfaces(@object.graphql_definition)
|
53
53
|
else
|
54
54
|
nil
|
55
55
|
end
|
@@ -57,7 +57,7 @@ module GraphQL
|
|
57
57
|
|
58
58
|
def input_fields
|
59
59
|
if @object.kind.input_object?
|
60
|
-
@context.warden.arguments(@object)
|
60
|
+
@context.warden.arguments(@object.graphql_definition)
|
61
61
|
else
|
62
62
|
nil
|
63
63
|
end
|
@@ -65,7 +65,7 @@ module GraphQL
|
|
65
65
|
|
66
66
|
def possible_types
|
67
67
|
if @object.kind.abstract?
|
68
|
-
@context.warden.possible_types(@object)
|
68
|
+
@context.warden.possible_types(@object.graphql_definition)
|
69
69
|
else
|
70
70
|
nil
|
71
71
|
end
|
@@ -75,7 +75,7 @@ module GraphQL
|
|
75
75
|
if !@object.kind.fields?
|
76
76
|
nil
|
77
77
|
else
|
78
|
-
fields = @context.warden.fields(@object)
|
78
|
+
fields = @context.warden.fields(@object.graphql_definition)
|
79
79
|
if !include_deprecated
|
80
80
|
fields = fields.select {|f| !f.deprecation_reason }
|
81
81
|
end
|
data/lib/graphql/language.rb
CHANGED
@@ -42,6 +42,43 @@ module GraphQL
|
|
42
42
|
# Rebuild the string
|
43
43
|
lines.join("\n")
|
44
44
|
end
|
45
|
+
|
46
|
+
def self.print(str, indent: '')
|
47
|
+
lines = str.split("\n")
|
48
|
+
|
49
|
+
block_str = "#{indent}\"\"\"\n".dup
|
50
|
+
|
51
|
+
lines.each do |line|
|
52
|
+
if line == ''
|
53
|
+
block_str << "\n"
|
54
|
+
else
|
55
|
+
sublines = break_line(line, 120 - indent.length)
|
56
|
+
sublines.each do |subline|
|
57
|
+
block_str << "#{indent}#{subline}\n"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
block_str << "#{indent}\"\"\"\n".dup
|
63
|
+
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
def self.break_line(line, length)
|
68
|
+
return [line] if line.length < length + 5
|
69
|
+
|
70
|
+
parts = line.split(Regexp.new("((?: |^).{15,#{length - 40}}(?= |$))"))
|
71
|
+
return [line] if parts.length < 4
|
72
|
+
|
73
|
+
sublines = [parts.slice!(0, 3).join]
|
74
|
+
|
75
|
+
parts.each_with_index do |part, i|
|
76
|
+
next if i % 2 == 1
|
77
|
+
sublines << "#{part[1..-1]}#{parts[i + 1]}"
|
78
|
+
end
|
79
|
+
|
80
|
+
sublines
|
81
|
+
end
|
45
82
|
end
|
46
83
|
end
|
47
84
|
end
|
@@ -11,7 +11,7 @@ module GraphQL
|
|
11
11
|
# @param except [<#call(member, ctx)>]
|
12
12
|
# @param include_introspection_types [Boolean] Whether or not to include introspection types in the AST
|
13
13
|
# @param include_built_in_scalars [Boolean] Whether or not to include built in scalars in the AST
|
14
|
-
# @param include_built_in_directives [Boolean] Whether or not to include built in
|
14
|
+
# @param include_built_in_directives [Boolean] Whether or not to include built in directives in the AST
|
15
15
|
class DocumentFromSchemaDefinition
|
16
16
|
def initialize(
|
17
17
|
schema, context: nil, only: nil, except: nil, include_introspection_types: false,
|
@@ -20,7 +20,7 @@ class << self
|
|
20
20
|
private :_graphql_lexer_trans_keys, :_graphql_lexer_trans_keys=
|
21
21
|
end
|
22
22
|
self._graphql_lexer_trans_keys = [
|
23
|
-
4, 21, 4, 21, 4, 4, 4, 4, 4, 4, 13, 14, 13, 14, 10, 14, 12, 12, 0, 47, 0, 0, 4, 21, 4, 21, 4, 4, 4, 4, 1, 1, 13, 14, 10, 27, 13, 14, 10, 27, 10, 27, 12, 12, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 0 ,
|
23
|
+
4, 21, 4, 21, 4, 21, 4, 4, 4, 4, 4, 21, 4, 4, 4, 4, 13, 14, 13, 14, 10, 14, 12, 12, 0, 47, 0, 0, 4, 21, 4, 21, 4, 4, 4, 4, 4, 4, 4, 21, 4, 4, 4, 4, 1, 1, 13, 14, 10, 27, 13, 14, 10, 27, 10, 27, 12, 12, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 13, 44, 0 ,
|
24
24
|
]
|
25
25
|
|
26
26
|
class << self
|
@@ -36,7 +36,7 @@ class << self
|
|
36
36
|
private :_graphql_lexer_index_offsets, :_graphql_lexer_index_offsets=
|
37
37
|
end
|
38
38
|
self._graphql_lexer_index_offsets = [
|
39
|
-
0, 18, 36,
|
39
|
+
0, 18, 36, 54, 55, 56, 74, 75, 76, 78, 80, 85, 86, 134, 135, 153, 171, 172, 173, 174, 192, 193, 194, 195, 197, 215, 217, 235, 253, 254, 286, 318, 350, 382, 414, 446, 478, 510, 542, 574, 606, 638, 670, 702, 734, 766, 798, 830, 862, 894, 926, 958, 990, 1022, 1054, 1086, 1118, 1150, 1182, 1214, 1246, 1278, 1310, 1342, 1374, 1406, 1438, 1470, 1502, 1534, 1566, 1598, 1630, 1662, 1694, 1726, 1758, 1790, 1822, 1854, 1886, 1918, 1950, 1982, 2014, 2046, 2078, 2110, 2142, 2174, 2206, 2238, 2270, 2302, 2334, 2366, 2398, 2430, 2462, 2494, 2526, 2558, 2590, 2622, 2654, 2686, 2718, 2750, 2782, 2814, 2846, 2878, 2910, 2942, 2974, 0 ,
|
40
40
|
]
|
41
41
|
|
42
42
|
class << self
|
@@ -44,7 +44,7 @@ class << self
|
|
44
44
|
private :_graphql_lexer_indicies, :_graphql_lexer_indicies=
|
45
45
|
end
|
46
46
|
self._graphql_lexer_indicies = [
|
47
|
-
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 6, 7, 8, 9, 9, 11, 11, 12, 12, 0, 9, 9, 14, 16, 17, 15, 18, 19, 20, 21, 22, 23, 24, 15, 25, 26, 27, 28, 29, 30, 31, 32, 32, 33, 15, 34, 32, 32, 32, 35, 36, 37, 32, 32, 38, 32, 39, 40, 41, 32, 42, 32, 43, 44, 45, 32, 32, 32, 46, 47, 48, 16, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 8, 54, 27, 28, 12, 12, 56, 9, 9, 55, 55, 55, 55, 57, 55, 55, 55, 55, 55, 55, 55, 57, 9, 9, 12, 12, 58, 11, 11, 58, 58, 58, 58, 57, 58, 58, 58, 58, 58, 58, 58, 57, 12, 12, 56, 28, 28, 55, 55, 55, 55, 57, 55, 55, 55, 55, 55, 55, 55, 57, 59, 32, 32, 0, 0, 0, 32, 32, 0, 0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 62, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 63, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 64, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 65, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 66, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 67, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 68, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 69, 32, 32, 32, 32, 32, 32, 32, 32, 70, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 71, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 72, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 73, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 74, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 75, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 76, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 77, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 78, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 79, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 80, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 81, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 82, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 83, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 84, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 85, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 87, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 88, 89, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 90, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 91, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 92, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 93, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 94, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 95, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 96, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 97, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 98, 32, 32, 32, 99, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 100, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 101, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 102, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 103, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 104, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 105, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 106, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 107, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 108, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 109, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 110, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 111, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 112, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 113, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 114, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 115, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 116, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 117, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 118, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 119, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 120, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 121, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 122, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 123, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 124, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 125, 32, 32, 32, 32, 32, 32, 126, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 127, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 128, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 129, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 130, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 131, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 132, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 133, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 134, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 135, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 136, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 137, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 138, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 139, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 140, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 141, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 142, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 143, 32, 32, 32, 32, 32, 144, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 145, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 146, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 147, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 148, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 149, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 150, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 151, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 60, 60, 60, 32, 32, 60, 60, 60, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 152, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 0 ,
|
47
|
+
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 8, 9, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 11, 12, 13, 13, 15, 15, 16, 16, 0, 13, 13, 18, 20, 21, 19, 22, 23, 24, 25, 26, 27, 28, 19, 29, 30, 31, 32, 33, 34, 35, 36, 36, 37, 19, 38, 36, 36, 36, 39, 40, 41, 36, 36, 42, 36, 43, 44, 45, 36, 46, 36, 47, 48, 49, 36, 36, 36, 50, 51, 52, 20, 55, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 58, 59, 60, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 61, 9, 62, 31, 32, 16, 16, 64, 13, 13, 63, 63, 63, 63, 65, 63, 63, 63, 63, 63, 63, 63, 65, 13, 13, 16, 16, 66, 15, 15, 66, 66, 66, 66, 65, 66, 66, 66, 66, 66, 66, 66, 65, 16, 16, 64, 32, 32, 63, 63, 63, 63, 65, 63, 63, 63, 63, 63, 63, 63, 65, 67, 36, 36, 0, 0, 0, 36, 36, 0, 0, 0, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 69, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 70, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 71, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 72, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 73, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 74, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 75, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 76, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 77, 36, 36, 36, 36, 36, 36, 36, 36, 78, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 79, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 80, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 81, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 82, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 83, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 84, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 85, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 86, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 87, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 88, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 89, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 90, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 91, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 92, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 93, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 94, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 95, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 96, 97, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 98, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 99, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 100, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 101, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 102, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 103, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 104, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 105, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 106, 36, 36, 36, 107, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 108, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 109, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 110, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 111, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 112, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 113, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 114, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 115, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 116, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 117, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 118, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 119, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 120, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 121, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 122, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 123, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 124, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 125, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 126, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 127, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 128, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 129, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 130, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 131, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 132, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 133, 36, 36, 36, 36, 36, 36, 134, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 135, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 136, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 137, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 138, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 139, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 140, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 141, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 142, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 143, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 144, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 145, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 146, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 147, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 148, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 149, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 150, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 151, 36, 36, 36, 36, 36, 152, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 153, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 154, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 155, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 156, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 157, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 158, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 159, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 68, 68, 68, 36, 36, 68, 68, 68, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 160, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 0 ,
|
48
48
|
]
|
49
49
|
|
50
50
|
class << self
|
@@ -52,7 +52,7 @@ class << self
|
|
52
52
|
private :_graphql_lexer_index_defaults, :_graphql_lexer_index_defaults=
|
53
53
|
end
|
54
54
|
self._graphql_lexer_index_defaults = [
|
55
|
-
1, 1, 5, 5, 5, 0,
|
55
|
+
1, 1, 5, 5, 5, 5, 5, 5, 0, 14, 0, 17, 19, 53, 1, 1, 56, 57, 57, 5, 5, 5, 24, 54, 63, 66, 66, 63, 54, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0 ,
|
56
56
|
]
|
57
57
|
|
58
58
|
class << self
|
@@ -60,7 +60,7 @@ class << self
|
|
60
60
|
private :_graphql_lexer_trans_cond_spaces, :_graphql_lexer_trans_cond_spaces=
|
61
61
|
end
|
62
62
|
self._graphql_lexer_trans_cond_spaces = [
|
63
|
-
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 ,
|
63
|
+
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 ,
|
64
64
|
]
|
65
65
|
|
66
66
|
class << self
|
@@ -68,7 +68,7 @@ class << self
|
|
68
68
|
private :_graphql_lexer_cond_targs, :_graphql_lexer_cond_targs=
|
69
69
|
end
|
70
70
|
self._graphql_lexer_cond_targs = [
|
71
|
-
|
71
|
+
12, 0, 12, 1, 15, 2, 3, 5, 4, 17, 6, 7, 19, 25, 12, 26, 8, 12, 12, 12, 13, 12, 12, 14, 22, 12, 12, 12, 12, 23, 28, 24, 27, 12, 12, 12, 29, 12, 12, 30, 38, 45, 55, 73, 80, 83, 84, 88, 106, 111, 12, 12, 12, 12, 12, 16, 12, 12, 18, 12, 20, 21, 12, 12, 9, 10, 12, 11, 12, 31, 32, 33, 34, 35, 36, 37, 29, 39, 41, 40, 29, 42, 43, 44, 29, 46, 49, 47, 48, 29, 50, 51, 52, 53, 54, 29, 56, 64, 57, 58, 59, 60, 61, 62, 63, 29, 65, 67, 66, 29, 68, 69, 70, 71, 72, 29, 74, 75, 76, 77, 78, 79, 29, 81, 82, 29, 29, 85, 86, 87, 29, 89, 96, 90, 93, 91, 92, 29, 94, 95, 29, 97, 98, 99, 100, 101, 102, 103, 104, 105, 29, 107, 109, 108, 29, 110, 29, 112, 113, 114, 29, 0 ,
|
72
72
|
]
|
73
73
|
|
74
74
|
class << self
|
@@ -76,7 +76,7 @@ class << self
|
|
76
76
|
private :_graphql_lexer_cond_actions, :_graphql_lexer_cond_actions=
|
77
77
|
end
|
78
78
|
self._graphql_lexer_cond_actions = [
|
79
|
-
1, 0, 2, 0, 3, 0, 0, 0, 4, 0, 5, 6, 0, 7, 8, 11, 0, 12, 13, 14, 0, 15, 16, 17, 18, 0, 19, 20, 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 28, 29, 30, 31, 3, 32, 33, 34, 35, 0, 0,
|
79
|
+
1, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 6, 0, 7, 8, 11, 0, 12, 13, 14, 0, 15, 16, 17, 18, 0, 19, 20, 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 28, 29, 30, 31, 3, 32, 33, 0, 34, 4, 4, 35, 36, 0, 0, 37, 0, 38, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, 41, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 47, 0, 0, 48, 49, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 51, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 54, 0, 55, 0, 0, 0, 56, 0 ,
|
80
80
|
]
|
81
81
|
|
82
82
|
class << self
|
@@ -84,7 +84,7 @@ class << self
|
|
84
84
|
private :_graphql_lexer_to_state_actions, :_graphql_lexer_to_state_actions=
|
85
85
|
end
|
86
86
|
self._graphql_lexer_to_state_actions = [
|
87
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,
|
87
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,
|
88
88
|
]
|
89
89
|
|
90
90
|
class << self
|
@@ -92,7 +92,7 @@ class << self
|
|
92
92
|
private :_graphql_lexer_from_state_actions, :_graphql_lexer_from_state_actions=
|
93
93
|
end
|
94
94
|
self._graphql_lexer_from_state_actions = [
|
95
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,
|
95
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,
|
96
96
|
]
|
97
97
|
|
98
98
|
class << self
|
@@ -100,7 +100,7 @@ class << self
|
|
100
100
|
private :_graphql_lexer_eof_trans, :_graphql_lexer_eof_trans=
|
101
101
|
end
|
102
102
|
self._graphql_lexer_eof_trans = [
|
103
|
-
1, 1, 1, 1, 1, 1,
|
103
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 1, 18, 0, 54, 55, 57, 57, 58, 58, 58, 58, 58, 63, 55, 64, 67, 67, 64, 55, 1, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 0 ,
|
104
104
|
]
|
105
105
|
|
106
106
|
class << self
|
@@ -116,7 +116,7 @@ class << self
|
|
116
116
|
private :_graphql_lexer_nfa_offsets, :_graphql_lexer_nfa_offsets=
|
117
117
|
end
|
118
118
|
self._graphql_lexer_nfa_offsets = [
|
119
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,
|
119
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,
|
120
120
|
]
|
121
121
|
|
122
122
|
class << self
|
@@ -138,12 +138,12 @@ self._graphql_lexer_nfa_pop_trans = [
|
|
138
138
|
class << self
|
139
139
|
attr_accessor :graphql_lexer_start
|
140
140
|
end
|
141
|
-
self.graphql_lexer_start =
|
141
|
+
self.graphql_lexer_start = 12;
|
142
142
|
|
143
143
|
class << self
|
144
144
|
attr_accessor :graphql_lexer_first_final
|
145
145
|
end
|
146
|
-
self.graphql_lexer_first_final =
|
146
|
+
self.graphql_lexer_first_final = 12;
|
147
147
|
|
148
148
|
class << self
|
149
149
|
attr_accessor :graphql_lexer_error
|
@@ -153,7 +153,7 @@ self.graphql_lexer_error = -1;
|
|
153
153
|
class << self
|
154
154
|
attr_accessor :graphql_lexer_en_main
|
155
155
|
end
|
156
|
-
self.graphql_lexer_en_main =
|
156
|
+
self.graphql_lexer_en_main = 12;
|
157
157
|
|
158
158
|
def self.run_lexer(query_string)
|
159
159
|
data = query_string.unpack("c*")
|
@@ -394,6 +394,20 @@ def self.run_lexer(query_string)
|
|
394
394
|
|
395
395
|
end
|
396
396
|
|
397
|
+
end
|
398
|
+
when 34 then
|
399
|
+
begin
|
400
|
+
begin
|
401
|
+
begin
|
402
|
+
te = p+1;
|
403
|
+
begin
|
404
|
+
emit_string(ts, te, meta, block: true)
|
405
|
+
end
|
406
|
+
|
407
|
+
end
|
408
|
+
|
409
|
+
end
|
410
|
+
|
397
411
|
end
|
398
412
|
when 15 then
|
399
413
|
begin
|
@@ -523,7 +537,7 @@ def self.run_lexer(query_string)
|
|
523
537
|
end
|
524
538
|
|
525
539
|
end
|
526
|
-
when
|
540
|
+
when 36 then
|
527
541
|
begin
|
528
542
|
begin
|
529
543
|
begin
|
@@ -538,7 +552,7 @@ def self.run_lexer(query_string)
|
|
538
552
|
end
|
539
553
|
|
540
554
|
end
|
541
|
-
when
|
555
|
+
when 37 then
|
542
556
|
begin
|
543
557
|
begin
|
544
558
|
begin
|
@@ -583,7 +597,7 @@ def self.run_lexer(query_string)
|
|
583
597
|
end
|
584
598
|
|
585
599
|
end
|
586
|
-
when
|
600
|
+
when 38 then
|
587
601
|
begin
|
588
602
|
begin
|
589
603
|
begin
|
@@ -598,7 +612,7 @@ def self.run_lexer(query_string)
|
|
598
612
|
end
|
599
613
|
|
600
614
|
end
|
601
|
-
when
|
615
|
+
when 35 then
|
602
616
|
begin
|
603
617
|
begin
|
604
618
|
begin
|
@@ -916,7 +930,7 @@ def self.run_lexer(query_string)
|
|
916
930
|
end
|
917
931
|
|
918
932
|
end
|
919
|
-
when
|
933
|
+
when 49 then
|
920
934
|
begin
|
921
935
|
begin
|
922
936
|
begin
|
@@ -934,7 +948,7 @@ def self.run_lexer(query_string)
|
|
934
948
|
end
|
935
949
|
|
936
950
|
end
|
937
|
-
when
|
951
|
+
when 43 then
|
938
952
|
begin
|
939
953
|
begin
|
940
954
|
begin
|
@@ -952,7 +966,7 @@ def self.run_lexer(query_string)
|
|
952
966
|
end
|
953
967
|
|
954
968
|
end
|
955
|
-
when
|
969
|
+
when 54 then
|
956
970
|
begin
|
957
971
|
begin
|
958
972
|
begin
|
@@ -970,7 +984,7 @@ def self.run_lexer(query_string)
|
|
970
984
|
end
|
971
985
|
|
972
986
|
end
|
973
|
-
when
|
987
|
+
when 42 then
|
974
988
|
begin
|
975
989
|
begin
|
976
990
|
begin
|
@@ -988,7 +1002,7 @@ def self.run_lexer(query_string)
|
|
988
1002
|
end
|
989
1003
|
|
990
1004
|
end
|
991
|
-
when
|
1005
|
+
when 48 then
|
992
1006
|
begin
|
993
1007
|
begin
|
994
1008
|
begin
|
@@ -1006,7 +1020,7 @@ def self.run_lexer(query_string)
|
|
1006
1020
|
end
|
1007
1021
|
|
1008
1022
|
end
|
1009
|
-
when
|
1023
|
+
when 50 then
|
1010
1024
|
begin
|
1011
1025
|
begin
|
1012
1026
|
begin
|
@@ -1024,7 +1038,7 @@ def self.run_lexer(query_string)
|
|
1024
1038
|
end
|
1025
1039
|
|
1026
1040
|
end
|
1027
|
-
when
|
1041
|
+
when 47 then
|
1028
1042
|
begin
|
1029
1043
|
begin
|
1030
1044
|
begin
|
@@ -1042,7 +1056,7 @@ def self.run_lexer(query_string)
|
|
1042
1056
|
end
|
1043
1057
|
|
1044
1058
|
end
|
1045
|
-
when
|
1059
|
+
when 53 then
|
1046
1060
|
begin
|
1047
1061
|
begin
|
1048
1062
|
begin
|
@@ -1060,7 +1074,7 @@ def self.run_lexer(query_string)
|
|
1060
1074
|
end
|
1061
1075
|
|
1062
1076
|
end
|
1063
|
-
when
|
1077
|
+
when 52 then
|
1064
1078
|
begin
|
1065
1079
|
begin
|
1066
1080
|
begin
|
@@ -1078,7 +1092,7 @@ def self.run_lexer(query_string)
|
|
1078
1092
|
end
|
1079
1093
|
|
1080
1094
|
end
|
1081
|
-
when
|
1095
|
+
when 51 then
|
1082
1096
|
begin
|
1083
1097
|
begin
|
1084
1098
|
begin
|
@@ -1096,7 +1110,7 @@ def self.run_lexer(query_string)
|
|
1096
1110
|
end
|
1097
1111
|
|
1098
1112
|
end
|
1099
|
-
when
|
1113
|
+
when 55 then
|
1100
1114
|
begin
|
1101
1115
|
begin
|
1102
1116
|
begin
|
@@ -1114,7 +1128,7 @@ def self.run_lexer(query_string)
|
|
1114
1128
|
end
|
1115
1129
|
|
1116
1130
|
end
|
1117
|
-
when
|
1131
|
+
when 41 then
|
1118
1132
|
begin
|
1119
1133
|
begin
|
1120
1134
|
begin
|
@@ -1132,7 +1146,7 @@ def self.run_lexer(query_string)
|
|
1132
1146
|
end
|
1133
1147
|
|
1134
1148
|
end
|
1135
|
-
when
|
1149
|
+
when 44 then
|
1136
1150
|
begin
|
1137
1151
|
begin
|
1138
1152
|
begin
|
@@ -1150,7 +1164,7 @@ def self.run_lexer(query_string)
|
|
1150
1164
|
end
|
1151
1165
|
|
1152
1166
|
end
|
1153
|
-
when
|
1167
|
+
when 46 then
|
1154
1168
|
begin
|
1155
1169
|
begin
|
1156
1170
|
begin
|
@@ -1168,7 +1182,7 @@ def self.run_lexer(query_string)
|
|
1168
1182
|
end
|
1169
1183
|
|
1170
1184
|
end
|
1171
|
-
when
|
1185
|
+
when 56 then
|
1172
1186
|
begin
|
1173
1187
|
begin
|
1174
1188
|
begin
|
@@ -1186,7 +1200,7 @@ def self.run_lexer(query_string)
|
|
1186
1200
|
end
|
1187
1201
|
|
1188
1202
|
end
|
1189
|
-
when
|
1203
|
+
when 40 then
|
1190
1204
|
begin
|
1191
1205
|
begin
|
1192
1206
|
begin
|
@@ -1204,7 +1218,7 @@ def self.run_lexer(query_string)
|
|
1204
1218
|
end
|
1205
1219
|
|
1206
1220
|
end
|
1207
|
-
when
|
1221
|
+
when 45 then
|
1208
1222
|
begin
|
1209
1223
|
begin
|
1210
1224
|
begin
|
@@ -1222,7 +1236,7 @@ def self.run_lexer(query_string)
|
|
1222
1236
|
end
|
1223
1237
|
|
1224
1238
|
end
|
1225
|
-
when
|
1239
|
+
when 39 then
|
1226
1240
|
begin
|
1227
1241
|
begin
|
1228
1242
|
begin
|
@@ -1403,9 +1417,13 @@ def self.emit_string(ts, te, meta, block:)
|
|
1403
1417
|
quotes_length = block ? 3 : 1
|
1404
1418
|
ts += quotes_length
|
1405
1419
|
value = meta[:data][ts...te - quotes_length].pack(PACK_DIRECTIVE).force_encoding(UTF_8_ENCODING)
|
1420
|
+
line_incr = 0
|
1406
1421
|
if block
|
1422
|
+
line_incr = value.count("\n")
|
1407
1423
|
value = GraphQL::Language::BlockString.trim_whitespace(value)
|
1408
1424
|
end
|
1425
|
+
# TODO: replace with `String#match?` when we support only Ruby 2.4+
|
1426
|
+
# (It's faster: https://bugs.ruby-lang.org/issues/8110)
|
1409
1427
|
if value !~ VALID_STRING
|
1410
1428
|
meta[:tokens] << token = GraphQL::Language::Token.new(
|
1411
1429
|
name: :BAD_UNICODE_ESCAPE,
|
@@ -1428,6 +1446,7 @@ end
|
|
1428
1446
|
|
1429
1447
|
meta[:previous_token] = token
|
1430
1448
|
meta[:col] += te - ts
|
1449
|
+
meta[:line] += line_incr
|
1431
1450
|
end
|
1432
1451
|
end
|
1433
1452
|
end
|