graphql 1.11.2 → 1.11.7
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.
Potentially problematic release.
This version of graphql might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/generators/graphql/core.rb +8 -0
- data/lib/generators/graphql/object_generator.rb +2 -0
- data/lib/generators/graphql/templates/base_argument.erb +2 -0
- data/lib/generators/graphql/templates/base_enum.erb +2 -0
- data/lib/generators/graphql/templates/base_field.erb +2 -0
- data/lib/generators/graphql/templates/base_input_object.erb +2 -0
- data/lib/generators/graphql/templates/base_interface.erb +2 -0
- data/lib/generators/graphql/templates/base_mutation.erb +2 -0
- data/lib/generators/graphql/templates/base_object.erb +2 -0
- data/lib/generators/graphql/templates/base_scalar.erb +2 -0
- data/lib/generators/graphql/templates/base_union.erb +2 -0
- data/lib/generators/graphql/templates/enum.erb +2 -0
- data/lib/generators/graphql/templates/graphql_controller.erb +2 -0
- data/lib/generators/graphql/templates/interface.erb +2 -0
- data/lib/generators/graphql/templates/loader.erb +2 -0
- data/lib/generators/graphql/templates/mutation.erb +2 -0
- data/lib/generators/graphql/templates/mutation_type.erb +2 -0
- data/lib/generators/graphql/templates/object.erb +2 -0
- data/lib/generators/graphql/templates/query_type.erb +2 -0
- data/lib/generators/graphql/templates/scalar.erb +2 -0
- data/lib/generators/graphql/templates/schema.erb +2 -0
- data/lib/generators/graphql/templates/union.erb +3 -1
- data/lib/graphql.rb +17 -0
- data/lib/graphql/argument.rb +3 -3
- data/lib/graphql/backtrace/tracer.rb +2 -1
- data/lib/graphql/define/assign_global_id_field.rb +2 -2
- data/lib/graphql/execution/interpreter.rb +10 -0
- data/lib/graphql/execution/interpreter/arguments.rb +21 -6
- data/lib/graphql/execution/interpreter/arguments_cache.rb +8 -0
- data/lib/graphql/execution/interpreter/runtime.rb +94 -67
- data/lib/graphql/integer_decoding_error.rb +17 -0
- data/lib/graphql/introspection.rb +96 -0
- data/lib/graphql/introspection/field_type.rb +7 -3
- data/lib/graphql/introspection/input_value_type.rb +6 -0
- data/lib/graphql/introspection/introspection_query.rb +6 -92
- data/lib/graphql/introspection/type_type.rb +7 -3
- data/lib/graphql/invalid_null_error.rb +1 -1
- data/lib/graphql/language/block_string.rb +24 -5
- data/lib/graphql/language/lexer.rb +7 -3
- data/lib/graphql/language/lexer.rl +7 -3
- data/lib/graphql/language/nodes.rb +1 -1
- data/lib/graphql/language/parser.rb +107 -103
- data/lib/graphql/language/parser.y +4 -0
- data/lib/graphql/language/sanitized_printer.rb +59 -26
- data/lib/graphql/name_validator.rb +6 -7
- data/lib/graphql/pagination/connections.rb +11 -3
- data/lib/graphql/query.rb +6 -3
- data/lib/graphql/query/context.rb +34 -4
- data/lib/graphql/query/fingerprint.rb +2 -0
- data/lib/graphql/query/validation_pipeline.rb +4 -1
- data/lib/graphql/relay/array_connection.rb +2 -2
- data/lib/graphql/relay/range_add.rb +14 -5
- data/lib/graphql/schema.rb +49 -18
- data/lib/graphql/schema/argument.rb +56 -10
- data/lib/graphql/schema/build_from_definition.rb +67 -38
- data/lib/graphql/schema/build_from_definition/resolve_map.rb +3 -1
- data/lib/graphql/schema/default_type_error.rb +2 -0
- data/lib/graphql/schema/directive/deprecated.rb +1 -1
- data/lib/graphql/schema/field.rb +32 -16
- data/lib/graphql/schema/field/connection_extension.rb +44 -37
- data/lib/graphql/schema/field/scope_extension.rb +1 -1
- data/lib/graphql/schema/input_object.rb +5 -3
- data/lib/graphql/schema/interface.rb +1 -1
- data/lib/graphql/schema/late_bound_type.rb +2 -2
- data/lib/graphql/schema/loader.rb +1 -0
- data/lib/graphql/schema/member/build_type.rb +14 -4
- data/lib/graphql/schema/member/has_arguments.rb +54 -53
- data/lib/graphql/schema/member/has_fields.rb +17 -7
- data/lib/graphql/schema/member/type_system_helpers.rb +2 -2
- data/lib/graphql/schema/mutation.rb +4 -0
- data/lib/graphql/schema/relay_classic_mutation.rb +4 -2
- data/lib/graphql/schema/resolver.rb +6 -0
- data/lib/graphql/schema/resolver/has_payload_type.rb +2 -1
- data/lib/graphql/schema/subscription.rb +2 -12
- data/lib/graphql/schema/timeout.rb +29 -15
- data/lib/graphql/schema/unique_within_type.rb +1 -2
- data/lib/graphql/schema/validation.rb +8 -0
- data/lib/graphql/schema/warden.rb +2 -3
- data/lib/graphql/static_validation.rb +1 -0
- data/lib/graphql/static_validation/all_rules.rb +1 -0
- data/lib/graphql/static_validation/rules/fields_will_merge.rb +25 -17
- data/lib/graphql/static_validation/rules/input_object_names_are_unique.rb +30 -0
- data/lib/graphql/static_validation/rules/input_object_names_are_unique_error.rb +30 -0
- data/lib/graphql/static_validation/validation_timeout_error.rb +25 -0
- data/lib/graphql/static_validation/validator.rb +29 -7
- data/lib/graphql/subscriptions.rb +32 -22
- data/lib/graphql/subscriptions/action_cable_subscriptions.rb +21 -7
- data/lib/graphql/tracing/appoptics_tracing.rb +10 -2
- data/lib/graphql/tracing/platform_tracing.rb +1 -1
- data/lib/graphql/tracing/prometheus_tracing/graphql_collector.rb +4 -1
- data/lib/graphql/types/int.rb +9 -2
- data/lib/graphql/types/iso_8601_date_time.rb +2 -1
- data/lib/graphql/types/relay/base_connection.rb +8 -6
- data/lib/graphql/types/relay/base_edge.rb +2 -1
- data/lib/graphql/types/string.rb +7 -1
- data/lib/graphql/unauthorized_error.rb +1 -1
- data/lib/graphql/version.rb +1 -1
- data/readme.md +1 -1
- metadata +10 -6
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module GraphQL
|
3
|
+
# This error is raised when `Types::Int` is given an input value outside of 32-bit integer range.
|
4
|
+
#
|
5
|
+
# For really big integer values, consider `GraphQL::Types::BigInt`
|
6
|
+
#
|
7
|
+
# @see GraphQL::Types::Int which raises this error
|
8
|
+
class IntegerDecodingError < GraphQL::RuntimeTypeError
|
9
|
+
# The value which couldn't be decoded
|
10
|
+
attr_reader :integer_value
|
11
|
+
|
12
|
+
def initialize(value)
|
13
|
+
@integer_value = value
|
14
|
+
super("Integer out of bounds: #{value}. \nConsider using GraphQL::Types::BigInt instead.")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,6 +1,102 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module GraphQL
|
3
3
|
module Introspection
|
4
|
+
def self.query(include_deprecated_args: false)
|
5
|
+
# The introspection query to end all introspection queries, copied from
|
6
|
+
# https://github.com/graphql/graphql-js/blob/master/src/utilities/introspectionQuery.js
|
7
|
+
<<-QUERY
|
8
|
+
query IntrospectionQuery {
|
9
|
+
__schema {
|
10
|
+
queryType { name }
|
11
|
+
mutationType { name }
|
12
|
+
subscriptionType { name }
|
13
|
+
types {
|
14
|
+
...FullType
|
15
|
+
}
|
16
|
+
directives {
|
17
|
+
name
|
18
|
+
description
|
19
|
+
locations
|
20
|
+
args {
|
21
|
+
...InputValue
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
fragment FullType on __Type {
|
27
|
+
kind
|
28
|
+
name
|
29
|
+
description
|
30
|
+
fields(includeDeprecated: true) {
|
31
|
+
name
|
32
|
+
description
|
33
|
+
args#{include_deprecated_args ? '(includeDeprecated: true)' : ''} {
|
34
|
+
...InputValue
|
35
|
+
}
|
36
|
+
type {
|
37
|
+
...TypeRef
|
38
|
+
}
|
39
|
+
isDeprecated
|
40
|
+
deprecationReason
|
41
|
+
}
|
42
|
+
inputFields#{include_deprecated_args ? '(includeDeprecated: true)' : ''} {
|
43
|
+
...InputValue
|
44
|
+
}
|
45
|
+
interfaces {
|
46
|
+
...TypeRef
|
47
|
+
}
|
48
|
+
enumValues(includeDeprecated: true) {
|
49
|
+
name
|
50
|
+
description
|
51
|
+
isDeprecated
|
52
|
+
deprecationReason
|
53
|
+
}
|
54
|
+
possibleTypes {
|
55
|
+
...TypeRef
|
56
|
+
}
|
57
|
+
}
|
58
|
+
fragment InputValue on __InputValue {
|
59
|
+
name
|
60
|
+
description
|
61
|
+
type { ...TypeRef }
|
62
|
+
defaultValue
|
63
|
+
#{include_deprecated_args ? 'isDeprecated' : ''}
|
64
|
+
#{include_deprecated_args ? 'deprecationReason' : ''}
|
65
|
+
}
|
66
|
+
fragment TypeRef on __Type {
|
67
|
+
kind
|
68
|
+
name
|
69
|
+
ofType {
|
70
|
+
kind
|
71
|
+
name
|
72
|
+
ofType {
|
73
|
+
kind
|
74
|
+
name
|
75
|
+
ofType {
|
76
|
+
kind
|
77
|
+
name
|
78
|
+
ofType {
|
79
|
+
kind
|
80
|
+
name
|
81
|
+
ofType {
|
82
|
+
kind
|
83
|
+
name
|
84
|
+
ofType {
|
85
|
+
kind
|
86
|
+
name
|
87
|
+
ofType {
|
88
|
+
kind
|
89
|
+
name
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
QUERY
|
99
|
+
end
|
4
100
|
end
|
5
101
|
end
|
6
102
|
|
@@ -7,7 +7,9 @@ module GraphQL
|
|
7
7
|
"a name, potentially a list of arguments, and a return type."
|
8
8
|
field :name, String, null: false
|
9
9
|
field :description, String, null: true
|
10
|
-
field :args, [GraphQL::Schema::LateBoundType.new("__InputValue")], null: false
|
10
|
+
field :args, [GraphQL::Schema::LateBoundType.new("__InputValue")], null: false do
|
11
|
+
argument :include_deprecated, Boolean, required: false, default_value: false
|
12
|
+
end
|
11
13
|
field :type, GraphQL::Schema::LateBoundType.new("__Type"), null: false
|
12
14
|
field :is_deprecated, Boolean, null: false
|
13
15
|
field :deprecation_reason, String, null: true
|
@@ -16,8 +18,10 @@ module GraphQL
|
|
16
18
|
!!@object.deprecation_reason
|
17
19
|
end
|
18
20
|
|
19
|
-
def args
|
20
|
-
@context.warden.arguments(@object)
|
21
|
+
def args(include_deprecated:)
|
22
|
+
args = @context.warden.arguments(@object)
|
23
|
+
args = args.reject(&:deprecation_reason) unless include_deprecated
|
24
|
+
args
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
@@ -10,6 +10,12 @@ module GraphQL
|
|
10
10
|
field :description, String, null: true
|
11
11
|
field :type, GraphQL::Schema::LateBoundType.new("__Type"), null: false
|
12
12
|
field :default_value, String, "A GraphQL-formatted string representing the default value for this input value.", null: true
|
13
|
+
field :is_deprecated, Boolean, null: false
|
14
|
+
field :deprecation_reason, String, null: true
|
15
|
+
|
16
|
+
def is_deprecated
|
17
|
+
!!@object.deprecation_reason
|
18
|
+
end
|
13
19
|
|
14
20
|
def default_value
|
15
21
|
if @object.default_value?
|
@@ -1,93 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
#
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
mutationType { name }
|
9
|
-
subscriptionType { name }
|
10
|
-
types {
|
11
|
-
...FullType
|
12
|
-
}
|
13
|
-
directives {
|
14
|
-
name
|
15
|
-
description
|
16
|
-
locations
|
17
|
-
args {
|
18
|
-
...InputValue
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
fragment FullType on __Type {
|
24
|
-
kind
|
25
|
-
name
|
26
|
-
description
|
27
|
-
fields(includeDeprecated: true) {
|
28
|
-
name
|
29
|
-
description
|
30
|
-
args {
|
31
|
-
...InputValue
|
32
|
-
}
|
33
|
-
type {
|
34
|
-
...TypeRef
|
35
|
-
}
|
36
|
-
isDeprecated
|
37
|
-
deprecationReason
|
38
|
-
}
|
39
|
-
inputFields {
|
40
|
-
...InputValue
|
41
|
-
}
|
42
|
-
interfaces {
|
43
|
-
...TypeRef
|
44
|
-
}
|
45
|
-
enumValues(includeDeprecated: true) {
|
46
|
-
name
|
47
|
-
description
|
48
|
-
isDeprecated
|
49
|
-
deprecationReason
|
50
|
-
}
|
51
|
-
possibleTypes {
|
52
|
-
...TypeRef
|
53
|
-
}
|
54
|
-
}
|
55
|
-
fragment InputValue on __InputValue {
|
56
|
-
name
|
57
|
-
description
|
58
|
-
type { ...TypeRef }
|
59
|
-
defaultValue
|
60
|
-
}
|
61
|
-
fragment TypeRef on __Type {
|
62
|
-
kind
|
63
|
-
name
|
64
|
-
ofType {
|
65
|
-
kind
|
66
|
-
name
|
67
|
-
ofType {
|
68
|
-
kind
|
69
|
-
name
|
70
|
-
ofType {
|
71
|
-
kind
|
72
|
-
name
|
73
|
-
ofType {
|
74
|
-
kind
|
75
|
-
name
|
76
|
-
ofType {
|
77
|
-
kind
|
78
|
-
name
|
79
|
-
ofType {
|
80
|
-
kind
|
81
|
-
name
|
82
|
-
ofType {
|
83
|
-
kind
|
84
|
-
name
|
85
|
-
}
|
86
|
-
}
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}
|
93
|
-
"
|
2
|
+
|
3
|
+
# This query is used by graphql-client so don't add the includeDeprecated
|
4
|
+
# argument for inputFields since the server may not support it. Two stage
|
5
|
+
# introspection queries will be required to handle this in clients.
|
6
|
+
GraphQL::Introspection::INTROSPECTION_QUERY = GraphQL::Introspection.query
|
7
|
+
|
@@ -22,7 +22,9 @@ module GraphQL
|
|
22
22
|
field :enum_values, [GraphQL::Schema::LateBoundType.new("__EnumValue")], null: true do
|
23
23
|
argument :include_deprecated, Boolean, required: false, default_value: false
|
24
24
|
end
|
25
|
-
field :input_fields, [GraphQL::Schema::LateBoundType.new("__InputValue")], null: true
|
25
|
+
field :input_fields, [GraphQL::Schema::LateBoundType.new("__InputValue")], null: true do
|
26
|
+
argument :include_deprecated, Boolean, required: false, default_value: false
|
27
|
+
end
|
26
28
|
field :of_type, GraphQL::Schema::LateBoundType.new("__Type"), null: true
|
27
29
|
|
28
30
|
def name
|
@@ -55,9 +57,11 @@ module GraphQL
|
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
58
|
-
def input_fields
|
60
|
+
def input_fields(include_deprecated:)
|
59
61
|
if @object.kind.input_object?
|
60
|
-
@context.warden.arguments(@object)
|
62
|
+
args = @context.warden.arguments(@object)
|
63
|
+
args = args.reject(&:deprecation_reason) unless include_deprecated
|
64
|
+
args
|
61
65
|
else
|
62
66
|
nil
|
63
67
|
end
|
@@ -39,7 +39,7 @@ module GraphQL
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def inspect
|
42
|
-
if name.nil? && parent_class.respond_to?(:mutation) && (mutation = parent_class.mutation)
|
42
|
+
if (name.nil? || parent_class.name.nil?) && parent_class.respond_to?(:mutation) && (mutation = parent_class.mutation)
|
43
43
|
"#{mutation.inspect}::#{parent_class.graphql_name}::InvalidNullError"
|
44
44
|
else
|
45
45
|
super
|
@@ -2,10 +2,21 @@
|
|
2
2
|
module GraphQL
|
3
3
|
module Language
|
4
4
|
module BlockString
|
5
|
+
if !String.method_defined?(:match?)
|
6
|
+
using GraphQL::StringMatchBackport
|
7
|
+
end
|
8
|
+
|
5
9
|
# Remove leading and trailing whitespace from a block string.
|
6
10
|
# See "Block Strings" in https://github.com/facebook/graphql/blob/master/spec/Section%202%20--%20Language.md
|
7
11
|
def self.trim_whitespace(str)
|
8
|
-
|
12
|
+
# Early return for the most common cases:
|
13
|
+
if str == ""
|
14
|
+
return ""
|
15
|
+
elsif !(has_newline = str.include?("\n")) && !(str.start_with?(" "))
|
16
|
+
return str
|
17
|
+
end
|
18
|
+
|
19
|
+
lines = has_newline ? str.split("\n") : [str]
|
9
20
|
common_indent = nil
|
10
21
|
|
11
22
|
# find the common whitespace
|
@@ -14,19 +25,27 @@ module GraphQL
|
|
14
25
|
next
|
15
26
|
end
|
16
27
|
line_length = line.size
|
17
|
-
line_indent = line
|
28
|
+
line_indent = if line.match?(/\A [^ ]/)
|
29
|
+
2
|
30
|
+
elsif line.match?(/\A [^ ]/)
|
31
|
+
4
|
32
|
+
elsif line.match?(/\A[^ ]/)
|
33
|
+
0
|
34
|
+
else
|
35
|
+
line[/\A */].size
|
36
|
+
end
|
18
37
|
if line_indent < line_length && (common_indent.nil? || line_indent < common_indent)
|
19
38
|
common_indent = line_indent
|
20
39
|
end
|
21
40
|
end
|
22
41
|
|
23
42
|
# Remove the common whitespace
|
24
|
-
if common_indent
|
43
|
+
if common_indent && common_indent > 0
|
25
44
|
lines.each_with_index do |line, idx|
|
26
45
|
if idx == 0
|
27
46
|
next
|
28
47
|
else
|
29
|
-
line
|
48
|
+
line.slice!(0, common_indent)
|
30
49
|
end
|
31
50
|
end
|
32
51
|
end
|
@@ -40,7 +59,7 @@ module GraphQL
|
|
40
59
|
end
|
41
60
|
|
42
61
|
# Rebuild the string
|
43
|
-
lines.join("\n")
|
62
|
+
lines.size > 1 ? lines.join("\n") : (lines.first || "")
|
44
63
|
end
|
45
64
|
|
46
65
|
def self.print(str, indent: '')
|
@@ -3,6 +3,10 @@
|
|
3
3
|
module GraphQL
|
4
4
|
module Language
|
5
5
|
module Lexer
|
6
|
+
if !String.method_defined?(:match?)
|
7
|
+
using GraphQL::StringMatchBackport
|
8
|
+
end
|
9
|
+
|
6
10
|
def self.tokenize(query_string)
|
7
11
|
run_lexer(query_string)
|
8
12
|
end
|
@@ -163,7 +167,7 @@ end
|
|
163
167
|
self.graphql_lexer_en_main = 23;
|
164
168
|
|
165
169
|
def self.run_lexer(query_string)
|
166
|
-
data = query_string.unpack(
|
170
|
+
data = query_string.unpack(PACK_DIRECTIVE)
|
167
171
|
eof = data.length
|
168
172
|
|
169
173
|
# Since `Lexer` is a module, store all lexer state
|
@@ -1421,13 +1425,13 @@ def self.emit_string(ts, te, meta, block:)
|
|
1421
1425
|
quotes_length = block ? 3 : 1
|
1422
1426
|
value = meta[:data][ts + quotes_length, te - ts - 2 * quotes_length].pack(PACK_DIRECTIVE).force_encoding(UTF_8_ENCODING) || ''
|
1423
1427
|
line_incr = 0
|
1424
|
-
if block && !value.
|
1428
|
+
if block && !value.empty?
|
1425
1429
|
line_incr = value.count("\n")
|
1426
1430
|
value = GraphQL::Language::BlockString.trim_whitespace(value)
|
1427
1431
|
end
|
1428
1432
|
# TODO: replace with `String#match?` when we support only Ruby 2.4+
|
1429
1433
|
# (It's faster: https://bugs.ruby-lang.org/issues/8110)
|
1430
|
-
if !value.valid_encoding? || value
|
1434
|
+
if !value.valid_encoding? || !value.match?(VALID_STRING)
|
1431
1435
|
meta[:tokens] << token = GraphQL::Language::Token.new(
|
1432
1436
|
:BAD_UNICODE_ESCAPE,
|
1433
1437
|
value,
|
@@ -121,6 +121,10 @@
|
|
121
121
|
module GraphQL
|
122
122
|
module Language
|
123
123
|
module Lexer
|
124
|
+
if !String.method_defined?(:match?)
|
125
|
+
using GraphQL::StringMatchBackport
|
126
|
+
end
|
127
|
+
|
124
128
|
def self.tokenize(query_string)
|
125
129
|
run_lexer(query_string)
|
126
130
|
end
|
@@ -138,7 +142,7 @@ module GraphQL
|
|
138
142
|
%% write data;
|
139
143
|
|
140
144
|
def self.run_lexer(query_string)
|
141
|
-
data = query_string.unpack(
|
145
|
+
data = query_string.unpack(PACK_DIRECTIVE)
|
142
146
|
eof = data.length
|
143
147
|
|
144
148
|
# Since `Lexer` is a module, store all lexer state
|
@@ -213,13 +217,13 @@ module GraphQL
|
|
213
217
|
quotes_length = block ? 3 : 1
|
214
218
|
value = meta[:data][ts + quotes_length, te - ts - 2 * quotes_length].pack(PACK_DIRECTIVE).force_encoding(UTF_8_ENCODING) || ''
|
215
219
|
line_incr = 0
|
216
|
-
if block && !value.
|
220
|
+
if block && !value.empty?
|
217
221
|
line_incr = value.count("\n")
|
218
222
|
value = GraphQL::Language::BlockString.trim_whitespace(value)
|
219
223
|
end
|
220
224
|
# TODO: replace with `String#match?` when we support only Ruby 2.4+
|
221
225
|
# (It's faster: https://bugs.ruby-lang.org/issues/8110)
|
222
|
-
if !value.valid_encoding? || value
|
226
|
+
if !value.valid_encoding? || !value.match?(VALID_STRING)
|
223
227
|
meta[:tokens] << token = GraphQL::Language::Token.new(
|
224
228
|
:BAD_UNICODE_ESCAPE,
|
225
229
|
value,
|
@@ -255,7 +255,7 @@ module GraphQL
|
|
255
255
|
return
|
256
256
|
else
|
257
257
|
arguments = scalar_method_names.map { |m| "#{m}: nil"} +
|
258
|
-
@children_methods.keys.map { |m| "#{m}:
|
258
|
+
@children_methods.keys.map { |m| "#{m}: NO_CHILDREN" }
|
259
259
|
|
260
260
|
assignments = scalar_method_names.map { |m| "@#{m} = #{m}"} +
|
261
261
|
@children_methods.keys.map { |m| "@#{m} = #{m}.freeze" }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.4.
|
4
|
-
# from Racc
|
3
|
+
# This file is automatically generated by Racc 1.4.16
|
4
|
+
# from Racc grammar file "".
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'racc/parser.rb'
|
@@ -45,6 +45,10 @@ def self.parse(query_string, filename: nil, tracer: GraphQL::Tracing::NullTracer
|
|
45
45
|
self.new(query_string, filename: filename, tracer: tracer).parse_document
|
46
46
|
end
|
47
47
|
|
48
|
+
def self.parse_file(filename, tracer: GraphQL::Tracing::NullTracer)
|
49
|
+
self.parse(File.read(filename), filename: filename, tracer: tracer)
|
50
|
+
end
|
51
|
+
|
48
52
|
private
|
49
53
|
|
50
54
|
def next_token
|
@@ -981,7 +985,7 @@ module_eval(<<'.,.,', 'parser.y', 7)
|
|
981
985
|
|
982
986
|
module_eval(<<'.,.,', 'parser.y', 8)
|
983
987
|
def _reduce_4(val, _values, result)
|
984
|
-
val[0] << val[1]
|
988
|
+
val[0] << val[1]
|
985
989
|
result
|
986
990
|
end
|
987
991
|
.,.,
|
@@ -1008,7 +1012,7 @@ module_eval(<<'.,.,', 'parser.y', 21)
|
|
1008
1012
|
position_source: val[0],
|
1009
1013
|
}
|
1010
1014
|
)
|
1011
|
-
|
1015
|
+
|
1012
1016
|
result
|
1013
1017
|
end
|
1014
1018
|
.,.,
|
@@ -1022,7 +1026,7 @@ module_eval(<<'.,.,', 'parser.y', 33)
|
|
1022
1026
|
position_source: val[0],
|
1023
1027
|
}
|
1024
1028
|
)
|
1025
|
-
|
1029
|
+
|
1026
1030
|
result
|
1027
1031
|
end
|
1028
1032
|
.,.,
|
@@ -1036,7 +1040,7 @@ module_eval(<<'.,.,', 'parser.y', 42)
|
|
1036
1040
|
position_source: val[0],
|
1037
1041
|
}
|
1038
1042
|
)
|
1039
|
-
|
1043
|
+
|
1040
1044
|
result
|
1041
1045
|
end
|
1042
1046
|
.,.,
|
@@ -1049,7 +1053,7 @@ module_eval(<<'.,.,', 'parser.y', 42)
|
|
1049
1053
|
|
1050
1054
|
module_eval(<<'.,.,', 'parser.y', 57)
|
1051
1055
|
def _reduce_16(val, _values, result)
|
1052
|
-
result = nil
|
1056
|
+
result = nil
|
1053
1057
|
result
|
1054
1058
|
end
|
1055
1059
|
.,.,
|
@@ -1058,28 +1062,28 @@ module_eval(<<'.,.,', 'parser.y', 57)
|
|
1058
1062
|
|
1059
1063
|
module_eval(<<'.,.,', 'parser.y', 61)
|
1060
1064
|
def _reduce_18(val, _values, result)
|
1061
|
-
result = EMPTY_ARRAY
|
1065
|
+
result = EMPTY_ARRAY
|
1062
1066
|
result
|
1063
1067
|
end
|
1064
1068
|
.,.,
|
1065
1069
|
|
1066
1070
|
module_eval(<<'.,.,', 'parser.y', 62)
|
1067
1071
|
def _reduce_19(val, _values, result)
|
1068
|
-
result = val[1]
|
1072
|
+
result = val[1]
|
1069
1073
|
result
|
1070
1074
|
end
|
1071
1075
|
.,.,
|
1072
1076
|
|
1073
1077
|
module_eval(<<'.,.,', 'parser.y', 65)
|
1074
1078
|
def _reduce_20(val, _values, result)
|
1075
|
-
result = [val[0]]
|
1079
|
+
result = [val[0]]
|
1076
1080
|
result
|
1077
1081
|
end
|
1078
1082
|
.,.,
|
1079
1083
|
|
1080
1084
|
module_eval(<<'.,.,', 'parser.y', 66)
|
1081
1085
|
def _reduce_21(val, _values, result)
|
1082
|
-
val[0] << val[1]
|
1086
|
+
val[0] << val[1]
|
1083
1087
|
result
|
1084
1088
|
end
|
1085
1089
|
.,.,
|
@@ -1092,21 +1096,21 @@ module_eval(<<'.,.,', 'parser.y', 70)
|
|
1092
1096
|
default_value: val[4],
|
1093
1097
|
position_source: val[0],
|
1094
1098
|
})
|
1095
|
-
|
1099
|
+
|
1096
1100
|
result
|
1097
1101
|
end
|
1098
1102
|
.,.,
|
1099
1103
|
|
1100
1104
|
module_eval(<<'.,.,', 'parser.y', 79)
|
1101
1105
|
def _reduce_23(val, _values, result)
|
1102
|
-
result = val[0]
|
1106
|
+
result = val[0]
|
1103
1107
|
result
|
1104
1108
|
end
|
1105
1109
|
.,.,
|
1106
1110
|
|
1107
1111
|
module_eval(<<'.,.,', 'parser.y', 80)
|
1108
1112
|
def _reduce_24(val, _values, result)
|
1109
|
-
result = make_node(:NonNullType, of_type: val[0])
|
1113
|
+
result = make_node(:NonNullType, of_type: val[0])
|
1110
1114
|
result
|
1111
1115
|
end
|
1112
1116
|
.,.,
|
@@ -1120,56 +1124,56 @@ module_eval(<<'.,.,', 'parser.y', 83)
|
|
1120
1124
|
|
1121
1125
|
module_eval(<<'.,.,', 'parser.y', 84)
|
1122
1126
|
def _reduce_26(val, _values, result)
|
1123
|
-
result = make_node(:ListType, of_type: val[1])
|
1127
|
+
result = make_node(:ListType, of_type: val[1])
|
1124
1128
|
result
|
1125
1129
|
end
|
1126
1130
|
.,.,
|
1127
1131
|
|
1128
1132
|
module_eval(<<'.,.,', 'parser.y', 87)
|
1129
1133
|
def _reduce_27(val, _values, result)
|
1130
|
-
result = nil
|
1134
|
+
result = nil
|
1131
1135
|
result
|
1132
1136
|
end
|
1133
1137
|
.,.,
|
1134
1138
|
|
1135
1139
|
module_eval(<<'.,.,', 'parser.y', 88)
|
1136
1140
|
def _reduce_28(val, _values, result)
|
1137
|
-
result = val[1]
|
1141
|
+
result = val[1]
|
1138
1142
|
result
|
1139
1143
|
end
|
1140
1144
|
.,.,
|
1141
1145
|
|
1142
1146
|
module_eval(<<'.,.,', 'parser.y', 91)
|
1143
1147
|
def _reduce_29(val, _values, result)
|
1144
|
-
result = val[1]
|
1148
|
+
result = val[1]
|
1145
1149
|
result
|
1146
1150
|
end
|
1147
1151
|
.,.,
|
1148
1152
|
|
1149
1153
|
module_eval(<<'.,.,', 'parser.y', 94)
|
1150
1154
|
def _reduce_30(val, _values, result)
|
1151
|
-
result = EMPTY_ARRAY
|
1155
|
+
result = EMPTY_ARRAY
|
1152
1156
|
result
|
1153
1157
|
end
|
1154
1158
|
.,.,
|
1155
1159
|
|
1156
1160
|
module_eval(<<'.,.,', 'parser.y', 95)
|
1157
1161
|
def _reduce_31(val, _values, result)
|
1158
|
-
result = val[0]
|
1162
|
+
result = val[0]
|
1159
1163
|
result
|
1160
1164
|
end
|
1161
1165
|
.,.,
|
1162
1166
|
|
1163
1167
|
module_eval(<<'.,.,', 'parser.y', 98)
|
1164
1168
|
def _reduce_32(val, _values, result)
|
1165
|
-
result = [result]
|
1169
|
+
result = [result]
|
1166
1170
|
result
|
1167
1171
|
end
|
1168
1172
|
.,.,
|
1169
1173
|
|
1170
1174
|
module_eval(<<'.,.,', 'parser.y', 99)
|
1171
1175
|
def _reduce_33(val, _values, result)
|
1172
|
-
val[0] << val[1]
|
1176
|
+
val[0] << val[1]
|
1173
1177
|
result
|
1174
1178
|
end
|
1175
1179
|
.,.,
|
@@ -1191,7 +1195,7 @@ module_eval(<<'.,.,', 'parser.y', 108)
|
|
1191
1195
|
position_source: val[0],
|
1192
1196
|
}
|
1193
1197
|
)
|
1194
|
-
|
1198
|
+
|
1195
1199
|
result
|
1196
1200
|
end
|
1197
1201
|
.,.,
|
@@ -1208,7 +1212,7 @@ module_eval(<<'.,.,', 'parser.y', 119)
|
|
1208
1212
|
position_source: val[0],
|
1209
1213
|
}
|
1210
1214
|
)
|
1211
|
-
|
1215
|
+
|
1212
1216
|
result
|
1213
1217
|
end
|
1214
1218
|
.,.,
|
@@ -1259,49 +1263,49 @@ module_eval(<<'.,.,', 'parser.y', 119)
|
|
1259
1263
|
|
1260
1264
|
module_eval(<<'.,.,', 'parser.y', 162)
|
1261
1265
|
def _reduce_61(val, _values, result)
|
1262
|
-
result = make_node(:EnumValueDefinition, name: val[1], directives: val[2], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1266
|
+
result = make_node(:EnumValueDefinition, name: val[1], directives: val[2], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1263
1267
|
result
|
1264
1268
|
end
|
1265
1269
|
.,.,
|
1266
1270
|
|
1267
1271
|
module_eval(<<'.,.,', 'parser.y', 165)
|
1268
1272
|
def _reduce_62(val, _values, result)
|
1269
|
-
result = [val[0]]
|
1273
|
+
result = [val[0]]
|
1270
1274
|
result
|
1271
1275
|
end
|
1272
1276
|
.,.,
|
1273
1277
|
|
1274
1278
|
module_eval(<<'.,.,', 'parser.y', 166)
|
1275
1279
|
def _reduce_63(val, _values, result)
|
1276
|
-
result = val[0] << val[1]
|
1280
|
+
result = val[0] << val[1]
|
1277
1281
|
result
|
1278
1282
|
end
|
1279
1283
|
.,.,
|
1280
1284
|
|
1281
1285
|
module_eval(<<'.,.,', 'parser.y', 169)
|
1282
1286
|
def _reduce_64(val, _values, result)
|
1283
|
-
result = EMPTY_ARRAY
|
1287
|
+
result = EMPTY_ARRAY
|
1284
1288
|
result
|
1285
1289
|
end
|
1286
1290
|
.,.,
|
1287
1291
|
|
1288
1292
|
module_eval(<<'.,.,', 'parser.y', 170)
|
1289
1293
|
def _reduce_65(val, _values, result)
|
1290
|
-
result = val[1]
|
1294
|
+
result = val[1]
|
1291
1295
|
result
|
1292
1296
|
end
|
1293
1297
|
.,.,
|
1294
1298
|
|
1295
1299
|
module_eval(<<'.,.,', 'parser.y', 173)
|
1296
1300
|
def _reduce_66(val, _values, result)
|
1297
|
-
result = [val[0]]
|
1301
|
+
result = [val[0]]
|
1298
1302
|
result
|
1299
1303
|
end
|
1300
1304
|
.,.,
|
1301
1305
|
|
1302
1306
|
module_eval(<<'.,.,', 'parser.y', 174)
|
1303
1307
|
def _reduce_67(val, _values, result)
|
1304
|
-
val[0] << val[1]
|
1308
|
+
val[0] << val[1]
|
1305
1309
|
result
|
1306
1310
|
end
|
1307
1311
|
.,.,
|
@@ -1315,35 +1319,35 @@ module_eval(<<'.,.,', 'parser.y', 177)
|
|
1315
1319
|
|
1316
1320
|
module_eval(<<'.,.,', 'parser.y', 180)
|
1317
1321
|
def _reduce_69(val, _values, result)
|
1318
|
-
result = val[0].to_f
|
1322
|
+
result = val[0].to_f
|
1319
1323
|
result
|
1320
1324
|
end
|
1321
1325
|
.,.,
|
1322
1326
|
|
1323
1327
|
module_eval(<<'.,.,', 'parser.y', 181)
|
1324
1328
|
def _reduce_70(val, _values, result)
|
1325
|
-
result = val[0].to_i
|
1329
|
+
result = val[0].to_i
|
1326
1330
|
result
|
1327
1331
|
end
|
1328
1332
|
.,.,
|
1329
1333
|
|
1330
1334
|
module_eval(<<'.,.,', 'parser.y', 182)
|
1331
1335
|
def _reduce_71(val, _values, result)
|
1332
|
-
result = val[0].to_s
|
1336
|
+
result = val[0].to_s
|
1333
1337
|
result
|
1334
1338
|
end
|
1335
1339
|
.,.,
|
1336
1340
|
|
1337
1341
|
module_eval(<<'.,.,', 'parser.y', 183)
|
1338
1342
|
def _reduce_72(val, _values, result)
|
1339
|
-
result = true
|
1343
|
+
result = true
|
1340
1344
|
result
|
1341
1345
|
end
|
1342
1346
|
.,.,
|
1343
1347
|
|
1344
1348
|
module_eval(<<'.,.,', 'parser.y', 184)
|
1345
1349
|
def _reduce_73(val, _values, result)
|
1346
|
-
result = false
|
1350
|
+
result = false
|
1347
1351
|
result
|
1348
1352
|
end
|
1349
1353
|
.,.,
|
@@ -1364,42 +1368,42 @@ module_eval(<<'.,.,', 'parser.y', 184)
|
|
1364
1368
|
|
1365
1369
|
module_eval(<<'.,.,', 'parser.y', 195)
|
1366
1370
|
def _reduce_81(val, _values, result)
|
1367
|
-
result = make_node(:NullValue, name: val[0], position_source: val[0])
|
1371
|
+
result = make_node(:NullValue, name: val[0], position_source: val[0])
|
1368
1372
|
result
|
1369
1373
|
end
|
1370
1374
|
.,.,
|
1371
1375
|
|
1372
1376
|
module_eval(<<'.,.,', 'parser.y', 196)
|
1373
1377
|
def _reduce_82(val, _values, result)
|
1374
|
-
result = make_node(:VariableIdentifier, name: val[1], position_source: val[0])
|
1378
|
+
result = make_node(:VariableIdentifier, name: val[1], position_source: val[0])
|
1375
1379
|
result
|
1376
1380
|
end
|
1377
1381
|
.,.,
|
1378
1382
|
|
1379
1383
|
module_eval(<<'.,.,', 'parser.y', 199)
|
1380
1384
|
def _reduce_83(val, _values, result)
|
1381
|
-
result = EMPTY_ARRAY
|
1385
|
+
result = EMPTY_ARRAY
|
1382
1386
|
result
|
1383
1387
|
end
|
1384
1388
|
.,.,
|
1385
1389
|
|
1386
1390
|
module_eval(<<'.,.,', 'parser.y', 200)
|
1387
1391
|
def _reduce_84(val, _values, result)
|
1388
|
-
result = val[1]
|
1392
|
+
result = val[1]
|
1389
1393
|
result
|
1390
1394
|
end
|
1391
1395
|
.,.,
|
1392
1396
|
|
1393
1397
|
module_eval(<<'.,.,', 'parser.y', 203)
|
1394
1398
|
def _reduce_85(val, _values, result)
|
1395
|
-
result = [val[0]]
|
1399
|
+
result = [val[0]]
|
1396
1400
|
result
|
1397
1401
|
end
|
1398
1402
|
.,.,
|
1399
1403
|
|
1400
1404
|
module_eval(<<'.,.,', 'parser.y', 204)
|
1401
1405
|
def _reduce_86(val, _values, result)
|
1402
|
-
val[0] << val[1]
|
1406
|
+
val[0] << val[1]
|
1403
1407
|
result
|
1404
1408
|
end
|
1405
1409
|
.,.,
|
@@ -1420,14 +1424,14 @@ module_eval(<<'.,.,', 'parser.y', 208)
|
|
1420
1424
|
|
1421
1425
|
module_eval(<<'.,.,', 'parser.y', 211)
|
1422
1426
|
def _reduce_89(val, _values, result)
|
1423
|
-
result = [val[0]]
|
1427
|
+
result = [val[0]]
|
1424
1428
|
result
|
1425
1429
|
end
|
1426
1430
|
.,.,
|
1427
1431
|
|
1428
1432
|
module_eval(<<'.,.,', 'parser.y', 212)
|
1429
1433
|
def _reduce_90(val, _values, result)
|
1430
|
-
val[0] << val[1]
|
1434
|
+
val[0] << val[1]
|
1431
1435
|
result
|
1432
1436
|
end
|
1433
1437
|
.,.,
|
@@ -1455,14 +1459,14 @@ module_eval(<<'.,.,', 'parser.y', 220)
|
|
1455
1459
|
|
1456
1460
|
module_eval(<<'.,.,', 'parser.y', 223)
|
1457
1461
|
def _reduce_94(val, _values, result)
|
1458
|
-
result = [val[0]]
|
1462
|
+
result = [val[0]]
|
1459
1463
|
result
|
1460
1464
|
end
|
1461
1465
|
.,.,
|
1462
1466
|
|
1463
1467
|
module_eval(<<'.,.,', 'parser.y', 224)
|
1464
1468
|
def _reduce_95(val, _values, result)
|
1465
|
-
val[0] << val[1]
|
1469
|
+
val[0] << val[1]
|
1466
1470
|
result
|
1467
1471
|
end
|
1468
1472
|
.,.,
|
@@ -1476,14 +1480,14 @@ module_eval(<<'.,.,', 'parser.y', 227)
|
|
1476
1480
|
|
1477
1481
|
module_eval(<<'.,.,', 'parser.y', 229)
|
1478
1482
|
def _reduce_97(val, _values, result)
|
1479
|
-
result = make_node(:Enum, name: val[0], position_source: val[0])
|
1483
|
+
result = make_node(:Enum, name: val[0], position_source: val[0])
|
1480
1484
|
result
|
1481
1485
|
end
|
1482
1486
|
.,.,
|
1483
1487
|
|
1484
1488
|
module_eval(<<'.,.,', 'parser.y', 232)
|
1485
1489
|
def _reduce_98(val, _values, result)
|
1486
|
-
result = EMPTY_ARRAY
|
1490
|
+
result = EMPTY_ARRAY
|
1487
1491
|
result
|
1488
1492
|
end
|
1489
1493
|
.,.,
|
@@ -1492,28 +1496,28 @@ module_eval(<<'.,.,', 'parser.y', 232)
|
|
1492
1496
|
|
1493
1497
|
module_eval(<<'.,.,', 'parser.y', 236)
|
1494
1498
|
def _reduce_100(val, _values, result)
|
1495
|
-
result = [val[0]]
|
1499
|
+
result = [val[0]]
|
1496
1500
|
result
|
1497
1501
|
end
|
1498
1502
|
.,.,
|
1499
1503
|
|
1500
1504
|
module_eval(<<'.,.,', 'parser.y', 237)
|
1501
1505
|
def _reduce_101(val, _values, result)
|
1502
|
-
val[0] << val[1]
|
1506
|
+
val[0] << val[1]
|
1503
1507
|
result
|
1504
1508
|
end
|
1505
1509
|
.,.,
|
1506
1510
|
|
1507
1511
|
module_eval(<<'.,.,', 'parser.y', 239)
|
1508
1512
|
def _reduce_102(val, _values, result)
|
1509
|
-
result = make_node(:Directive, name: val[1], arguments: val[2], position_source: val[0])
|
1513
|
+
result = make_node(:Directive, name: val[1], arguments: val[2], position_source: val[0])
|
1510
1514
|
result
|
1511
1515
|
end
|
1512
1516
|
.,.,
|
1513
1517
|
|
1514
1518
|
module_eval(<<'.,.,', 'parser.y', 242)
|
1515
1519
|
def _reduce_103(val, _values, result)
|
1516
|
-
result = make_node(:FragmentSpread, name: val[1], directives: val[2], position_source: val[0])
|
1520
|
+
result = make_node(:FragmentSpread, name: val[1], directives: val[2], position_source: val[0])
|
1517
1521
|
result
|
1518
1522
|
end
|
1519
1523
|
.,.,
|
@@ -1526,7 +1530,7 @@ module_eval(<<'.,.,', 'parser.y', 246)
|
|
1526
1530
|
selections: val[4],
|
1527
1531
|
position_source: val[0]
|
1528
1532
|
})
|
1529
|
-
|
1533
|
+
|
1530
1534
|
result
|
1531
1535
|
end
|
1532
1536
|
.,.,
|
@@ -1539,7 +1543,7 @@ module_eval(<<'.,.,', 'parser.y', 254)
|
|
1539
1543
|
selections: val[2],
|
1540
1544
|
position_source: val[0]
|
1541
1545
|
})
|
1542
|
-
|
1546
|
+
|
1543
1547
|
result
|
1544
1548
|
end
|
1545
1549
|
.,.,
|
@@ -1554,14 +1558,14 @@ module_eval(<<'.,.,', 'parser.y', 264)
|
|
1554
1558
|
position_source: val[0],
|
1555
1559
|
}
|
1556
1560
|
)
|
1557
|
-
|
1561
|
+
|
1558
1562
|
result
|
1559
1563
|
end
|
1560
1564
|
.,.,
|
1561
1565
|
|
1562
1566
|
module_eval(<<'.,.,', 'parser.y', 275)
|
1563
1567
|
def _reduce_107(val, _values, result)
|
1564
|
-
result = nil
|
1568
|
+
result = nil
|
1565
1569
|
result
|
1566
1570
|
end
|
1567
1571
|
.,.,
|
@@ -1576,7 +1580,7 @@ module_eval(<<'.,.,', 'parser.y', 275)
|
|
1576
1580
|
|
1577
1581
|
module_eval(<<'.,.,', 'parser.y', 284)
|
1578
1582
|
def _reduce_112(val, _values, result)
|
1579
|
-
result = make_node(:SchemaDefinition, position_source: val[0], definition_line: val[0].line, directives: val[1], **val[3])
|
1583
|
+
result = make_node(:SchemaDefinition, position_source: val[0], definition_line: val[0].line, directives: val[1], **val[3])
|
1580
1584
|
result
|
1581
1585
|
end
|
1582
1586
|
.,.,
|
@@ -1585,14 +1589,14 @@ module_eval(<<'.,.,', 'parser.y', 284)
|
|
1585
1589
|
|
1586
1590
|
module_eval(<<'.,.,', 'parser.y', 288)
|
1587
1591
|
def _reduce_114(val, _values, result)
|
1588
|
-
result = val[0].merge(val[1])
|
1592
|
+
result = val[0].merge(val[1])
|
1589
1593
|
result
|
1590
1594
|
end
|
1591
1595
|
.,.,
|
1592
1596
|
|
1593
1597
|
module_eval(<<'.,.,', 'parser.y', 291)
|
1594
1598
|
def _reduce_115(val, _values, result)
|
1595
|
-
result = { val[0].to_s.to_sym => val[2] }
|
1599
|
+
result = { val[0].to_s.to_sym => val[2] }
|
1596
1600
|
result
|
1597
1601
|
end
|
1598
1602
|
.,.,
|
@@ -1615,14 +1619,14 @@ module_eval(<<'.,.,', 'parser.y', 291)
|
|
1615
1619
|
|
1616
1620
|
module_eval(<<'.,.,', 'parser.y', 306)
|
1617
1621
|
def _reduce_124(val, _values, result)
|
1618
|
-
result = make_node(:SchemaExtension, position_source: val[0], directives: val[2], **val[4])
|
1622
|
+
result = make_node(:SchemaExtension, position_source: val[0], directives: val[2], **val[4])
|
1619
1623
|
result
|
1620
1624
|
end
|
1621
1625
|
.,.,
|
1622
1626
|
|
1623
1627
|
module_eval(<<'.,.,', 'parser.y', 307)
|
1624
1628
|
def _reduce_125(val, _values, result)
|
1625
|
-
result = make_node(:SchemaExtension, position_source: val[0], directives: val[2])
|
1629
|
+
result = make_node(:SchemaExtension, position_source: val[0], directives: val[2])
|
1626
1630
|
result
|
1627
1631
|
end
|
1628
1632
|
.,.,
|
@@ -1641,91 +1645,91 @@ module_eval(<<'.,.,', 'parser.y', 307)
|
|
1641
1645
|
|
1642
1646
|
module_eval(<<'.,.,', 'parser.y', 317)
|
1643
1647
|
def _reduce_132(val, _values, result)
|
1644
|
-
result = make_node(:ScalarTypeExtension, name: val[2], directives: val[3], position_source: val[0])
|
1648
|
+
result = make_node(:ScalarTypeExtension, name: val[2], directives: val[3], position_source: val[0])
|
1645
1649
|
result
|
1646
1650
|
end
|
1647
1651
|
.,.,
|
1648
1652
|
|
1649
1653
|
module_eval(<<'.,.,', 'parser.y', 321)
|
1650
1654
|
def _reduce_133(val, _values, result)
|
1651
|
-
result = make_node(:ObjectTypeExtension, name: val[2], interfaces: val[3], directives: [], fields: val[5], position_source: val[0])
|
1655
|
+
result = make_node(:ObjectTypeExtension, name: val[2], interfaces: val[3], directives: [], fields: val[5], position_source: val[0])
|
1652
1656
|
result
|
1653
1657
|
end
|
1654
1658
|
.,.,
|
1655
1659
|
|
1656
1660
|
module_eval(<<'.,.,', 'parser.y', 322)
|
1657
1661
|
def _reduce_134(val, _values, result)
|
1658
|
-
result = make_node(:ObjectTypeExtension, name: val[2], interfaces: val[3], directives: val[4], fields: val[6], position_source: val[0])
|
1662
|
+
result = make_node(:ObjectTypeExtension, name: val[2], interfaces: val[3], directives: val[4], fields: val[6], position_source: val[0])
|
1659
1663
|
result
|
1660
1664
|
end
|
1661
1665
|
.,.,
|
1662
1666
|
|
1663
1667
|
module_eval(<<'.,.,', 'parser.y', 323)
|
1664
1668
|
def _reduce_135(val, _values, result)
|
1665
|
-
result = make_node(:ObjectTypeExtension, name: val[2], interfaces: val[3], directives: val[4], fields: [], position_source: val[0])
|
1669
|
+
result = make_node(:ObjectTypeExtension, name: val[2], interfaces: val[3], directives: val[4], fields: [], position_source: val[0])
|
1666
1670
|
result
|
1667
1671
|
end
|
1668
1672
|
.,.,
|
1669
1673
|
|
1670
1674
|
module_eval(<<'.,.,', 'parser.y', 324)
|
1671
1675
|
def _reduce_136(val, _values, result)
|
1672
|
-
result = make_node(:ObjectTypeExtension, name: val[2], interfaces: val[3], directives: [], fields: [], position_source: val[0])
|
1676
|
+
result = make_node(:ObjectTypeExtension, name: val[2], interfaces: val[3], directives: [], fields: [], position_source: val[0])
|
1673
1677
|
result
|
1674
1678
|
end
|
1675
1679
|
.,.,
|
1676
1680
|
|
1677
1681
|
module_eval(<<'.,.,', 'parser.y', 327)
|
1678
1682
|
def _reduce_137(val, _values, result)
|
1679
|
-
result = make_node(:InterfaceTypeExtension, name: val[2], directives: val[3], fields: val[5], position_source: val[0])
|
1683
|
+
result = make_node(:InterfaceTypeExtension, name: val[2], directives: val[3], fields: val[5], position_source: val[0])
|
1680
1684
|
result
|
1681
1685
|
end
|
1682
1686
|
.,.,
|
1683
1687
|
|
1684
1688
|
module_eval(<<'.,.,', 'parser.y', 328)
|
1685
1689
|
def _reduce_138(val, _values, result)
|
1686
|
-
result = make_node(:InterfaceTypeExtension, name: val[2], directives: val[3], fields: [], position_source: val[0])
|
1690
|
+
result = make_node(:InterfaceTypeExtension, name: val[2], directives: val[3], fields: [], position_source: val[0])
|
1687
1691
|
result
|
1688
1692
|
end
|
1689
1693
|
.,.,
|
1690
1694
|
|
1691
1695
|
module_eval(<<'.,.,', 'parser.y', 331)
|
1692
1696
|
def _reduce_139(val, _values, result)
|
1693
|
-
result = make_node(:UnionTypeExtension, name: val[2], directives: val[3], types: val[5], position_source: val[0])
|
1697
|
+
result = make_node(:UnionTypeExtension, name: val[2], directives: val[3], types: val[5], position_source: val[0])
|
1694
1698
|
result
|
1695
1699
|
end
|
1696
1700
|
.,.,
|
1697
1701
|
|
1698
1702
|
module_eval(<<'.,.,', 'parser.y', 332)
|
1699
1703
|
def _reduce_140(val, _values, result)
|
1700
|
-
result = make_node(:UnionTypeExtension, name: val[2], directives: val[3], types: [], position_source: val[0])
|
1704
|
+
result = make_node(:UnionTypeExtension, name: val[2], directives: val[3], types: [], position_source: val[0])
|
1701
1705
|
result
|
1702
1706
|
end
|
1703
1707
|
.,.,
|
1704
1708
|
|
1705
1709
|
module_eval(<<'.,.,', 'parser.y', 335)
|
1706
1710
|
def _reduce_141(val, _values, result)
|
1707
|
-
result = make_node(:EnumTypeExtension, name: val[2], directives: val[3], values: val[5], position_source: val[0])
|
1711
|
+
result = make_node(:EnumTypeExtension, name: val[2], directives: val[3], values: val[5], position_source: val[0])
|
1708
1712
|
result
|
1709
1713
|
end
|
1710
1714
|
.,.,
|
1711
1715
|
|
1712
1716
|
module_eval(<<'.,.,', 'parser.y', 336)
|
1713
1717
|
def _reduce_142(val, _values, result)
|
1714
|
-
result = make_node(:EnumTypeExtension, name: val[2], directives: val[3], values: [], position_source: val[0])
|
1718
|
+
result = make_node(:EnumTypeExtension, name: val[2], directives: val[3], values: [], position_source: val[0])
|
1715
1719
|
result
|
1716
1720
|
end
|
1717
1721
|
.,.,
|
1718
1722
|
|
1719
1723
|
module_eval(<<'.,.,', 'parser.y', 339)
|
1720
1724
|
def _reduce_143(val, _values, result)
|
1721
|
-
result = make_node(:InputObjectTypeExtension, name: val[2], directives: val[3], fields: val[5], position_source: val[0])
|
1725
|
+
result = make_node(:InputObjectTypeExtension, name: val[2], directives: val[3], fields: val[5], position_source: val[0])
|
1722
1726
|
result
|
1723
1727
|
end
|
1724
1728
|
.,.,
|
1725
1729
|
|
1726
1730
|
module_eval(<<'.,.,', 'parser.y', 340)
|
1727
1731
|
def _reduce_144(val, _values, result)
|
1728
|
-
result = make_node(:InputObjectTypeExtension, name: val[2], directives: val[3], fields: [], position_source: val[0])
|
1732
|
+
result = make_node(:InputObjectTypeExtension, name: val[2], directives: val[3], fields: [], position_source: val[0])
|
1729
1733
|
result
|
1730
1734
|
end
|
1731
1735
|
.,.,
|
@@ -1739,7 +1743,7 @@ module_eval(<<'.,.,', 'parser.y', 340)
|
|
1739
1743
|
module_eval(<<'.,.,', 'parser.y', 350)
|
1740
1744
|
def _reduce_148(val, _values, result)
|
1741
1745
|
result = make_node(:ScalarTypeDefinition, name: val[2], directives: val[3], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1742
|
-
|
1746
|
+
|
1743
1747
|
result
|
1744
1748
|
end
|
1745
1749
|
.,.,
|
@@ -1747,14 +1751,14 @@ module_eval(<<'.,.,', 'parser.y', 350)
|
|
1747
1751
|
module_eval(<<'.,.,', 'parser.y', 355)
|
1748
1752
|
def _reduce_149(val, _values, result)
|
1749
1753
|
result = make_node(:ObjectTypeDefinition, name: val[2], interfaces: val[3], directives: val[4], fields: val[6], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1750
|
-
|
1754
|
+
|
1751
1755
|
result
|
1752
1756
|
end
|
1753
1757
|
.,.,
|
1754
1758
|
|
1755
1759
|
module_eval(<<'.,.,', 'parser.y', 359)
|
1756
1760
|
def _reduce_150(val, _values, result)
|
1757
|
-
result = EMPTY_ARRAY
|
1761
|
+
result = EMPTY_ARRAY
|
1758
1762
|
result
|
1759
1763
|
end
|
1760
1764
|
.,.,
|
@@ -1763,49 +1767,49 @@ module_eval(<<'.,.,', 'parser.y', 359)
|
|
1763
1767
|
|
1764
1768
|
module_eval(<<'.,.,', 'parser.y', 363)
|
1765
1769
|
def _reduce_152(val, _values, result)
|
1766
|
-
result = val[2]
|
1770
|
+
result = val[2]
|
1767
1771
|
result
|
1768
1772
|
end
|
1769
1773
|
.,.,
|
1770
1774
|
|
1771
1775
|
module_eval(<<'.,.,', 'parser.y', 364)
|
1772
1776
|
def _reduce_153(val, _values, result)
|
1773
|
-
result = val[1]
|
1777
|
+
result = val[1]
|
1774
1778
|
result
|
1775
1779
|
end
|
1776
1780
|
.,.,
|
1777
1781
|
|
1778
1782
|
module_eval(<<'.,.,', 'parser.y', 365)
|
1779
1783
|
def _reduce_154(val, _values, result)
|
1780
|
-
result = val[1]
|
1784
|
+
result = val[1]
|
1781
1785
|
result
|
1782
1786
|
end
|
1783
1787
|
.,.,
|
1784
1788
|
|
1785
1789
|
module_eval(<<'.,.,', 'parser.y', 368)
|
1786
1790
|
def _reduce_155(val, _values, result)
|
1787
|
-
result = [make_node(:TypeName, name: val[0], position_source: val[0])]
|
1791
|
+
result = [make_node(:TypeName, name: val[0], position_source: val[0])]
|
1788
1792
|
result
|
1789
1793
|
end
|
1790
1794
|
.,.,
|
1791
1795
|
|
1792
1796
|
module_eval(<<'.,.,', 'parser.y', 369)
|
1793
1797
|
def _reduce_156(val, _values, result)
|
1794
|
-
val[0] << make_node(:TypeName, name: val[2], position_source: val[2])
|
1798
|
+
val[0] << make_node(:TypeName, name: val[2], position_source: val[2])
|
1795
1799
|
result
|
1796
1800
|
end
|
1797
1801
|
.,.,
|
1798
1802
|
|
1799
1803
|
module_eval(<<'.,.,', 'parser.y', 372)
|
1800
1804
|
def _reduce_157(val, _values, result)
|
1801
|
-
result = [make_node(:TypeName, name: val[0], position_source: val[0])]
|
1805
|
+
result = [make_node(:TypeName, name: val[0], position_source: val[0])]
|
1802
1806
|
result
|
1803
1807
|
end
|
1804
1808
|
.,.,
|
1805
1809
|
|
1806
1810
|
module_eval(<<'.,.,', 'parser.y', 373)
|
1807
1811
|
def _reduce_158(val, _values, result)
|
1808
|
-
val[0] << make_node(:TypeName, name: val[1], position_source: val[1])
|
1812
|
+
val[0] << make_node(:TypeName, name: val[1], position_source: val[1])
|
1809
1813
|
result
|
1810
1814
|
end
|
1811
1815
|
.,.,
|
@@ -1813,35 +1817,35 @@ module_eval(<<'.,.,', 'parser.y', 373)
|
|
1813
1817
|
module_eval(<<'.,.,', 'parser.y', 377)
|
1814
1818
|
def _reduce_159(val, _values, result)
|
1815
1819
|
result = make_node(:InputValueDefinition, name: val[1], type: val[3], default_value: val[4], directives: val[5], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1816
|
-
|
1820
|
+
|
1817
1821
|
result
|
1818
1822
|
end
|
1819
1823
|
.,.,
|
1820
1824
|
|
1821
1825
|
module_eval(<<'.,.,', 'parser.y', 381)
|
1822
1826
|
def _reduce_160(val, _values, result)
|
1823
|
-
result = [val[0]]
|
1827
|
+
result = [val[0]]
|
1824
1828
|
result
|
1825
1829
|
end
|
1826
1830
|
.,.,
|
1827
1831
|
|
1828
1832
|
module_eval(<<'.,.,', 'parser.y', 382)
|
1829
1833
|
def _reduce_161(val, _values, result)
|
1830
|
-
val[0] << val[1]
|
1834
|
+
val[0] << val[1]
|
1831
1835
|
result
|
1832
1836
|
end
|
1833
1837
|
.,.,
|
1834
1838
|
|
1835
1839
|
module_eval(<<'.,.,', 'parser.y', 385)
|
1836
1840
|
def _reduce_162(val, _values, result)
|
1837
|
-
result = EMPTY_ARRAY
|
1841
|
+
result = EMPTY_ARRAY
|
1838
1842
|
result
|
1839
1843
|
end
|
1840
1844
|
.,.,
|
1841
1845
|
|
1842
1846
|
module_eval(<<'.,.,', 'parser.y', 386)
|
1843
1847
|
def _reduce_163(val, _values, result)
|
1844
|
-
result = val[1]
|
1848
|
+
result = val[1]
|
1845
1849
|
result
|
1846
1850
|
end
|
1847
1851
|
.,.,
|
@@ -1849,28 +1853,28 @@ module_eval(<<'.,.,', 'parser.y', 386)
|
|
1849
1853
|
module_eval(<<'.,.,', 'parser.y', 390)
|
1850
1854
|
def _reduce_164(val, _values, result)
|
1851
1855
|
result = make_node(:FieldDefinition, name: val[1], arguments: val[2], type: val[4], directives: val[5], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1852
|
-
|
1856
|
+
|
1853
1857
|
result
|
1854
1858
|
end
|
1855
1859
|
.,.,
|
1856
1860
|
|
1857
1861
|
module_eval(<<'.,.,', 'parser.y', 394)
|
1858
1862
|
def _reduce_165(val, _values, result)
|
1859
|
-
result = EMPTY_ARRAY
|
1863
|
+
result = EMPTY_ARRAY
|
1860
1864
|
result
|
1861
1865
|
end
|
1862
1866
|
.,.,
|
1863
1867
|
|
1864
1868
|
module_eval(<<'.,.,', 'parser.y', 395)
|
1865
1869
|
def _reduce_166(val, _values, result)
|
1866
|
-
result = [val[0]]
|
1870
|
+
result = [val[0]]
|
1867
1871
|
result
|
1868
1872
|
end
|
1869
1873
|
.,.,
|
1870
1874
|
|
1871
1875
|
module_eval(<<'.,.,', 'parser.y', 396)
|
1872
1876
|
def _reduce_167(val, _values, result)
|
1873
|
-
val[0] << val[1]
|
1877
|
+
val[0] << val[1]
|
1874
1878
|
result
|
1875
1879
|
end
|
1876
1880
|
.,.,
|
@@ -1878,7 +1882,7 @@ module_eval(<<'.,.,', 'parser.y', 396)
|
|
1878
1882
|
module_eval(<<'.,.,', 'parser.y', 400)
|
1879
1883
|
def _reduce_168(val, _values, result)
|
1880
1884
|
result = make_node(:InterfaceTypeDefinition, name: val[2], directives: val[3], fields: val[5], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1881
|
-
|
1885
|
+
|
1882
1886
|
result
|
1883
1887
|
end
|
1884
1888
|
.,.,
|
@@ -1892,7 +1896,7 @@ module_eval(<<'.,.,', 'parser.y', 404)
|
|
1892
1896
|
|
1893
1897
|
module_eval(<<'.,.,', 'parser.y', 405)
|
1894
1898
|
def _reduce_170(val, _values, result)
|
1895
|
-
val[0] << make_node(:TypeName, name: val[2], position_source: val[2])
|
1899
|
+
val[0] << make_node(:TypeName, name: val[2], position_source: val[2])
|
1896
1900
|
result
|
1897
1901
|
end
|
1898
1902
|
.,.,
|
@@ -1900,7 +1904,7 @@ module_eval(<<'.,.,', 'parser.y', 405)
|
|
1900
1904
|
module_eval(<<'.,.,', 'parser.y', 409)
|
1901
1905
|
def _reduce_171(val, _values, result)
|
1902
1906
|
result = make_node(:UnionTypeDefinition, name: val[2], directives: val[3], types: val[5], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1903
|
-
|
1907
|
+
|
1904
1908
|
result
|
1905
1909
|
end
|
1906
1910
|
.,.,
|
@@ -1908,7 +1912,7 @@ module_eval(<<'.,.,', 'parser.y', 409)
|
|
1908
1912
|
module_eval(<<'.,.,', 'parser.y', 414)
|
1909
1913
|
def _reduce_172(val, _values, result)
|
1910
1914
|
result = make_node(:EnumTypeDefinition, name: val[2], directives: val[3], values: val[5], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1911
|
-
|
1915
|
+
|
1912
1916
|
result
|
1913
1917
|
end
|
1914
1918
|
.,.,
|
@@ -1916,7 +1920,7 @@ module_eval(<<'.,.,', 'parser.y', 414)
|
|
1916
1920
|
module_eval(<<'.,.,', 'parser.y', 419)
|
1917
1921
|
def _reduce_173(val, _values, result)
|
1918
1922
|
result = make_node(:InputObjectTypeDefinition, name: val[2], directives: val[3], fields: val[5], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1919
|
-
|
1923
|
+
|
1920
1924
|
result
|
1921
1925
|
end
|
1922
1926
|
.,.,
|
@@ -1924,21 +1928,21 @@ module_eval(<<'.,.,', 'parser.y', 419)
|
|
1924
1928
|
module_eval(<<'.,.,', 'parser.y', 424)
|
1925
1929
|
def _reduce_174(val, _values, result)
|
1926
1930
|
result = make_node(:DirectiveDefinition, name: val[3], arguments: val[4], locations: val[6], description: val[0] || get_description(val[1]), definition_line: val[1].line, position_source: val[0] || val[1])
|
1927
|
-
|
1931
|
+
|
1928
1932
|
result
|
1929
1933
|
end
|
1930
1934
|
.,.,
|
1931
1935
|
|
1932
1936
|
module_eval(<<'.,.,', 'parser.y', 428)
|
1933
1937
|
def _reduce_175(val, _values, result)
|
1934
|
-
result = [make_node(:DirectiveLocation, name: val[0].to_s, position_source: val[0])]
|
1938
|
+
result = [make_node(:DirectiveLocation, name: val[0].to_s, position_source: val[0])]
|
1935
1939
|
result
|
1936
1940
|
end
|
1937
1941
|
.,.,
|
1938
1942
|
|
1939
1943
|
module_eval(<<'.,.,', 'parser.y', 429)
|
1940
1944
|
def _reduce_176(val, _values, result)
|
1941
|
-
val[0] << make_node(:DirectiveLocation, name: val[2].to_s, position_source: val[2])
|
1945
|
+
val[0] << make_node(:DirectiveLocation, name: val[2].to_s, position_source: val[2])
|
1942
1946
|
result
|
1943
1947
|
end
|
1944
1948
|
.,.,
|
@@ -1948,5 +1952,5 @@ def _reduce_none(val, _values, result)
|
|
1948
1952
|
end
|
1949
1953
|
|
1950
1954
|
end # class Parser
|
1951
|
-
|
1952
|
-
|
1955
|
+
end # module Language
|
1956
|
+
end # module GraphQL
|