graphql 0.18.15 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql/define/assign_global_id_field.rb +1 -2
- data/lib/graphql/directive.rb +41 -7
- data/lib/graphql/directive/deprecated_directive.rb +11 -0
- data/lib/graphql/directive/include_directive.rb +2 -2
- data/lib/graphql/directive/skip_directive.rb +2 -2
- data/lib/graphql/input_object_type.rb +14 -0
- data/lib/graphql/internal_representation/node.rb +8 -4
- data/lib/graphql/introspection/arguments_field.rb +0 -1
- data/lib/graphql/introspection/directive_location_enum.rb +3 -2
- data/lib/graphql/introspection/directive_type.rb +12 -7
- data/lib/graphql/introspection/enum_value_type.rb +4 -2
- data/lib/graphql/introspection/enum_values_field.rb +0 -1
- data/lib/graphql/introspection/field_type.rb +8 -7
- data/lib/graphql/introspection/fields_field.rb +0 -1
- data/lib/graphql/introspection/input_fields_field.rb +0 -1
- data/lib/graphql/introspection/input_value_type.rb +8 -10
- data/lib/graphql/introspection/interfaces_field.rb +0 -1
- data/lib/graphql/introspection/of_type_field.rb +0 -1
- data/lib/graphql/introspection/possible_types_field.rb +0 -1
- data/lib/graphql/introspection/schema_type.rb +11 -9
- data/lib/graphql/introspection/type_kind_enum.rb +3 -3
- data/lib/graphql/introspection/type_type.rb +9 -6
- data/lib/graphql/language/generation.rb +4 -1
- data/lib/graphql/language/lexer.rb +353 -316
- data/lib/graphql/language/lexer.rl +8 -6
- data/lib/graphql/language/nodes.rb +12 -0
- data/lib/graphql/language/parser.rb +553 -501
- data/lib/graphql/language/parser.y +26 -16
- data/lib/graphql/language/parser_tests.rb +20 -1
- data/lib/graphql/list_type.rb +5 -1
- data/lib/graphql/non_null_type.rb +4 -0
- data/lib/graphql/object_type.rb +1 -1
- data/lib/graphql/query/literal_input.rb +1 -1
- data/lib/graphql/relay.rb +1 -1
- data/lib/graphql/relay/global_id_resolve.rb +3 -5
- data/lib/graphql/relay/node.rb +34 -0
- data/lib/graphql/scalar_type.rb +1 -1
- data/lib/graphql/schema.rb +43 -15
- data/lib/graphql/schema/loader.rb +2 -2
- data/lib/graphql/schema/printer.rb +50 -8
- data/lib/graphql/schema/unique_within_type.rb +28 -0
- data/lib/graphql/schema/validation.rb +10 -3
- data/lib/graphql/static_validation/rules/fields_will_merge.rb +9 -1
- data/lib/graphql/static_validation/rules/fragment_spreads_are_possible.rb +8 -2
- data/lib/graphql/type_kinds.rb +12 -12
- data/lib/graphql/version.rb +1 -1
- data/readme.md +6 -5
- data/spec/graphql/argument_spec.rb +1 -1
- data/spec/graphql/execution_error_spec.rb +53 -0
- data/spec/graphql/introspection/directive_type_spec.rb +10 -0
- data/spec/graphql/introspection/input_value_type_spec.rb +23 -0
- data/spec/graphql/language/generation_spec.rb +4 -0
- data/spec/graphql/query/executor_spec.rb +2 -2
- data/spec/graphql/relay/mutation_spec.rb +1 -1
- data/spec/graphql/relay/node_spec.rb +87 -0
- data/spec/graphql/schema/catchall_middleware_spec.rb +1 -1
- data/spec/graphql/schema/loader_spec.rb +37 -4
- data/spec/graphql/schema/printer_spec.rb +30 -7
- data/spec/graphql/schema/unique_within_type_spec.rb +27 -0
- data/spec/graphql/schema/validation_spec.rb +7 -11
- data/spec/graphql/schema_spec.rb +32 -2
- data/spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb +14 -15
- data/spec/graphql/static_validation/rules/arguments_are_defined_spec.rb +10 -10
- data/spec/graphql/static_validation/rules/directives_are_defined_spec.rb +1 -5
- data/spec/graphql/static_validation/rules/directives_are_in_valid_locations_spec.rb +3 -5
- data/spec/graphql/static_validation/rules/fields_are_defined_on_type_spec.rb +7 -11
- data/spec/graphql/static_validation/rules/fields_have_appropriate_selections_spec.rb +1 -4
- data/spec/graphql/static_validation/rules/fields_will_merge_spec.rb +10 -13
- data/spec/graphql/static_validation/rules/fragment_spreads_are_possible_spec.rb +3 -5
- data/spec/graphql/static_validation/rules/fragment_types_exist_spec.rb +2 -4
- data/spec/graphql/static_validation/rules/fragments_are_finite_spec.rb +4 -6
- data/spec/graphql/static_validation/rules/fragments_are_named_spec.rb +2 -4
- data/spec/graphql/static_validation/rules/fragments_are_on_composite_types_spec.rb +7 -7
- data/spec/graphql/static_validation/rules/fragments_are_used_spec.rb +1 -4
- data/spec/graphql/static_validation/rules/mutation_root_exists_spec.rb +2 -4
- data/spec/graphql/static_validation/rules/required_arguments_are_present_spec.rb +3 -6
- data/spec/graphql/static_validation/rules/subscription_root_exists_spec.rb +2 -4
- data/spec/graphql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb +12 -14
- data/spec/graphql/static_validation/rules/variable_usages_are_allowed_spec.rb +7 -9
- data/spec/graphql/static_validation/rules/variables_are_input_types_spec.rb +20 -22
- data/spec/graphql/static_validation/rules/variables_are_used_and_defined_spec.rb +27 -23
- data/spec/spec_helper.rb +1 -0
- data/spec/support/dairy_app.rb +2 -2
- data/spec/support/star_wars_schema.rb +15 -18
- data/spec/support/static_validation_helpers.rb +27 -0
- metadata +25 -5
- data/lib/graphql/relay/global_node_identification.rb +0 -138
- data/spec/graphql/relay/global_node_identification_spec.rb +0 -153
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f35dc8ba1aebf034fff6c88dd73344da8e85ffc7
|
4
|
+
data.tar.gz: e70103ee09aca356dbb8f792109cd0de0a2917d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b22c53d2834dd1700d862baf7a2e86223c677969b8247832c99e26828887309a8a9b0b6bac6af94cf51ef870ef5fe9d9714ba55ce9704912348bf9d7f099297
|
7
|
+
data.tar.gz: 998c6f2d696efdcb19c00731694583e3986a87fb30f45435637b11973e4a583fc05afca81e8d4ecbed99a2644dc3d2ea351ba312509c4db4834242b264b1890c
|
@@ -2,8 +2,7 @@ module GraphQL
|
|
2
2
|
module Define
|
3
3
|
module AssignGlobalIdField
|
4
4
|
def self.call(type_defn, field_name)
|
5
|
-
|
6
|
-
resolve = GraphQL::Relay::GlobalIdResolve.new(type_name: type_defn.name, property: field_name)
|
5
|
+
resolve = GraphQL::Relay::GlobalIdResolve.new(type: type_defn)
|
7
6
|
GraphQL::Define::AssignObjectField.call(type_defn, field_name, type: GraphQL::ID_TYPE.to_non_null_type, resolve: resolve)
|
8
7
|
end
|
9
8
|
end
|
data/lib/graphql/directive.rb
CHANGED
@@ -12,15 +12,48 @@ module GraphQL
|
|
12
12
|
lazy_defined_attr_accessor :locations, :arguments, :name, :description
|
13
13
|
|
14
14
|
LOCATIONS = [
|
15
|
-
QUERY =
|
16
|
-
MUTATION =
|
17
|
-
SUBSCRIPTION =
|
18
|
-
FIELD =
|
19
|
-
FRAGMENT_DEFINITION =
|
20
|
-
FRAGMENT_SPREAD =
|
21
|
-
INLINE_FRAGMENT =
|
15
|
+
QUERY = :QUERY,
|
16
|
+
MUTATION = :MUTATION,
|
17
|
+
SUBSCRIPTION = :SUBSCRIPTION,
|
18
|
+
FIELD = :FIELD,
|
19
|
+
FRAGMENT_DEFINITION = :FRAGMENT_DEFINITION,
|
20
|
+
FRAGMENT_SPREAD = :FRAGMENT_SPREAD,
|
21
|
+
INLINE_FRAGMENT = :INLINE_FRAGMENT,
|
22
|
+
SCHEMA = :SCHEMA,
|
23
|
+
SCALAR = :SCALAR,
|
24
|
+
OBJECT = :OBJECT,
|
25
|
+
FIELD_DEFINITION = :FIELD_DEFINITION,
|
26
|
+
ARGUMENT_DEFINITION = :ARGUMENT_DEFINITION,
|
27
|
+
INTERFACE = :INTERFACE,
|
28
|
+
UNION = :UNION,
|
29
|
+
ENUM = :ENUM,
|
30
|
+
ENUM_VALUE = :ENUM_VALUE,
|
31
|
+
INPUT_OBJECT = :INPUT_OBJECT,
|
32
|
+
INPUT_FIELD_DEFINITION = :INPUT_FIELD_DEFINITION,
|
22
33
|
]
|
23
34
|
|
35
|
+
DEFAULT_DEPRECATION_REASON = 'No longer supported'
|
36
|
+
LOCATION_DESCRIPTIONS = {
|
37
|
+
QUERY: 'Location adjacent to a query operation.',
|
38
|
+
MUTATION: 'Location adjacent to a mutation operation.',
|
39
|
+
SUBSCRIPTION: 'Location adjacent to a subscription operation.',
|
40
|
+
FIELD: 'Location adjacent to a field.',
|
41
|
+
FRAGMENT_DEFINITION: 'Location adjacent to a fragment definition.',
|
42
|
+
FRAGMENT_SPREAD: 'Location adjacent to a fragment spread.',
|
43
|
+
INLINE_FRAGMENT: 'Location adjacent to an inline fragment.',
|
44
|
+
SCHEMA: 'Location adjacent to a schema definition.',
|
45
|
+
SCALAR: 'Location adjacent to a scalar definition.',
|
46
|
+
OBJECT: 'Location adjacent to an object type definition.',
|
47
|
+
FIELD_DEFINITION: 'Location adjacent to a field definition.',
|
48
|
+
ARGUMENT_DEFINITION: 'Location adjacent to an argument definition.',
|
49
|
+
INTERFACE: 'Location adjacent to an interface definition.',
|
50
|
+
UNION: 'Location adjacent to a union definition.',
|
51
|
+
ENUM: 'Location adjacent to an enum definition.',
|
52
|
+
ENUM_VALUE: 'Location adjacent to an enum value definition.',
|
53
|
+
INPUT_OBJECT: 'Location adjacent to an input object type definition.',
|
54
|
+
INPUT_FIELD_DEFINITION: 'Location adjacent to an input object field definition.',
|
55
|
+
}
|
56
|
+
|
24
57
|
def initialize
|
25
58
|
@arguments = {}
|
26
59
|
end
|
@@ -45,3 +78,4 @@ end
|
|
45
78
|
|
46
79
|
require "graphql/directive/include_directive"
|
47
80
|
require "graphql/directive/skip_directive"
|
81
|
+
require "graphql/directive/deprecated_directive"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
GraphQL::Directive::DeprecatedDirective = GraphQL::Directive.define do
|
2
|
+
name "deprecated"
|
3
|
+
description "Marks an element of a GraphQL schema as no longer supported."
|
4
|
+
locations([GraphQL::Directive::FIELD_DEFINITION, GraphQL::Directive::ENUM_VALUE])
|
5
|
+
|
6
|
+
reason_description = "Explains why this element was deprecated, usually also including a "\
|
7
|
+
"suggestion for how to access supported similar data. Formatted "\
|
8
|
+
"in [Markdown](https://daringfireball.net/projects/markdown/)."
|
9
|
+
|
10
|
+
argument :reason, GraphQL::STRING_TYPE, reason_description, default_value: GraphQL::Directive::DEFAULT_DEPRECATION_REASON
|
11
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
GraphQL::Directive::IncludeDirective = GraphQL::Directive.define do
|
2
2
|
name "include"
|
3
|
-
description "
|
3
|
+
description "Directs the executor to include this field or fragment only when the `if` argument is true."
|
4
4
|
locations([GraphQL::Directive::FIELD, GraphQL::Directive::FRAGMENT_SPREAD, GraphQL::Directive::INLINE_FRAGMENT])
|
5
|
-
argument :if, !GraphQL::BOOLEAN_TYPE
|
5
|
+
argument :if, !GraphQL::BOOLEAN_TYPE, 'Included when true.'
|
6
6
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
GraphQL::Directive::SkipDirective = GraphQL::Directive.define do
|
2
2
|
name "skip"
|
3
|
-
description "
|
3
|
+
description "Directs the executor to skip this field or fragment when the `if` argument is true."
|
4
4
|
locations([GraphQL::Directive::FIELD, GraphQL::Directive::FRAGMENT_SPREAD, GraphQL::Directive::INLINE_FRAGMENT])
|
5
5
|
|
6
|
-
argument :if, !GraphQL::BOOLEAN_TYPE
|
6
|
+
argument :if, !GraphQL::BOOLEAN_TYPE, 'Skipped when true.'
|
7
7
|
end
|
@@ -87,5 +87,19 @@ module GraphQL
|
|
87
87
|
|
88
88
|
GraphQL::Query::Arguments.new(input_values)
|
89
89
|
end
|
90
|
+
|
91
|
+
def coerce_result(value)
|
92
|
+
# Allow the application to provide values as :symbols, and convert them to the strings
|
93
|
+
value = value.reduce({}) { |memo, (k, v)| memo[k.to_s] = v; memo }
|
94
|
+
|
95
|
+
result = {}
|
96
|
+
|
97
|
+
arguments.each do |input_key, input_field_defn|
|
98
|
+
input_value = value[input_key]
|
99
|
+
result[input_key] = input_value.nil? ? nil : input_field_defn.type.coerce_result(input_value)
|
100
|
+
end
|
101
|
+
|
102
|
+
result
|
103
|
+
end
|
90
104
|
end
|
91
105
|
end
|
@@ -82,10 +82,14 @@ module GraphQL
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def path
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
if parent
|
86
|
+
path = parent.path
|
87
|
+
path << name
|
88
|
+
path << @index if @index
|
89
|
+
path
|
90
|
+
else
|
91
|
+
[]
|
92
|
+
end
|
89
93
|
end
|
90
94
|
|
91
95
|
attr_writer :index
|
@@ -1,8 +1,9 @@
|
|
1
1
|
GraphQL::Introspection::DirectiveLocationEnum = GraphQL::EnumType.define do
|
2
2
|
name "__DirectiveLocation"
|
3
|
-
description "
|
3
|
+
description "A Directive can be adjacent to many parts of the GraphQL language, a "\
|
4
|
+
"__DirectiveLocation describes one such possible adjacencies."
|
4
5
|
|
5
6
|
GraphQL::Directive::LOCATIONS.each do |location|
|
6
|
-
value(location.to_s, value: location)
|
7
|
+
value(location.to_s, GraphQL::Directive::LOCATION_DESCRIPTIONS[location], value: location)
|
7
8
|
end
|
8
9
|
end
|
@@ -1,11 +1,16 @@
|
|
1
1
|
GraphQL::Introspection::DirectiveType = GraphQL::ObjectType.define do
|
2
2
|
name "__Directive"
|
3
|
-
description "A
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
description "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document."\
|
4
|
+
"\n\n"\
|
5
|
+
"In some cases, you need to provide options to alter GraphQL's execution behavior "\
|
6
|
+
"in ways field arguments will not suffice, such as conditionally including or "\
|
7
|
+
"skipping a field. Directives provide this by describing additional information "\
|
8
|
+
"to the executor."
|
9
|
+
field :name, !types.String
|
10
|
+
field :description, types.String
|
7
11
|
field :locations, !types[!GraphQL::Introspection::DirectiveLocationEnum]
|
8
|
-
field :
|
9
|
-
field :
|
10
|
-
field :
|
12
|
+
field :args, field: GraphQL::Introspection::ArgumentsField
|
13
|
+
field :onOperation, !types.Boolean, deprecation_reason: "Use `locations`.", property: :on_operation?
|
14
|
+
field :onFragment, !types.Boolean, deprecation_reason: "Use `locations`.", property: :on_fragment?
|
15
|
+
field :onField, !types.Boolean, deprecation_reason: "Use `locations`.", property: :on_field?
|
11
16
|
end
|
@@ -1,10 +1,12 @@
|
|
1
1
|
GraphQL::Introspection::EnumValueType = GraphQL::ObjectType.define do
|
2
2
|
name "__EnumValue"
|
3
|
-
description "
|
3
|
+
description "One possible value for a given Enum. Enum values are unique values, not a "\
|
4
|
+
"placeholder for a string or numeric value. However an Enum value is returned in "\
|
5
|
+
"a JSON response as a string."
|
4
6
|
field :name, !types.String
|
5
7
|
field :description, types.String
|
6
|
-
field :deprecationReason, types.String, property: :deprecation_reason
|
7
8
|
field :isDeprecated, !types.Boolean do
|
8
9
|
resolve -> (obj, a, c) { !!obj.deprecation_reason }
|
9
10
|
end
|
11
|
+
field :deprecationReason, types.String, property: :deprecation_reason
|
10
12
|
end
|
@@ -1,12 +1,13 @@
|
|
1
1
|
GraphQL::Introspection::FieldType = GraphQL::ObjectType.define do
|
2
2
|
name "__Field"
|
3
|
-
description "
|
4
|
-
|
5
|
-
field :
|
6
|
-
field :
|
7
|
-
field :
|
3
|
+
description "Object and Interface types are described by a list of Fields, each of which has "\
|
4
|
+
"a name, potentially a list of arguments, and a return type."
|
5
|
+
field :name, !types.String
|
6
|
+
field :description, types.String
|
7
|
+
field :args, GraphQL::Introspection::ArgumentsField
|
8
|
+
field :type, !GraphQL::Introspection::TypeType
|
9
|
+
field :isDeprecated, !types.Boolean do
|
8
10
|
resolve -> (obj, a, c) { !!obj.deprecation_reason }
|
9
11
|
end
|
10
|
-
field :
|
11
|
-
field :deprecationReason, types.String, "Why this field was deprecated", property: :deprecation_reason
|
12
|
+
field :deprecationReason, types.String, property: :deprecation_reason
|
12
13
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
GraphQL::Introspection::FieldsField = GraphQL::Field.define do
|
2
|
-
description "List of fields on this object"
|
3
2
|
type -> { types[!GraphQL::Introspection::FieldType] }
|
4
3
|
argument :includeDeprecated, GraphQL::BOOLEAN_TYPE, default_value: false
|
5
4
|
resolve -> (object, arguments, context) {
|
@@ -1,17 +1,15 @@
|
|
1
1
|
GraphQL::Introspection::InputValueType = GraphQL::ObjectType.define do
|
2
2
|
name "__InputValue"
|
3
|
-
description "
|
4
|
-
|
5
|
-
|
6
|
-
field :
|
7
|
-
field :
|
3
|
+
description "Arguments provided to Fields or Directives and the input fields of an "\
|
4
|
+
"InputObject are represented as Input Values which describe their type and "\
|
5
|
+
"optionally a default value."
|
6
|
+
field :name, !types.String
|
7
|
+
field :description, types.String
|
8
|
+
field :type, !GraphQL::Introspection::TypeType
|
9
|
+
field :defaultValue, types.String, "A GraphQL-formatted string representing the default value for this input value." do
|
8
10
|
resolve -> (obj, args, ctx) {
|
9
11
|
value = obj.default_value
|
10
|
-
|
11
|
-
"\"#{value}\""
|
12
|
-
else
|
13
|
-
value
|
14
|
-
end
|
12
|
+
value.nil? ? nil : JSON.dump(obj.type.coerce_result(value))
|
15
13
|
}
|
16
14
|
end
|
17
15
|
end
|
@@ -1,24 +1,26 @@
|
|
1
1
|
GraphQL::Introspection::SchemaType = GraphQL::ObjectType.define do
|
2
2
|
name "__Schema"
|
3
|
-
description "A GraphQL
|
3
|
+
description "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all "\
|
4
|
+
"available types and directives on the server, as well as the entry points for "\
|
5
|
+
"query, mutation, and subscription operations."
|
4
6
|
|
5
|
-
field :types, !types[!GraphQL::Introspection::TypeType], "
|
7
|
+
field :types, !types[!GraphQL::Introspection::TypeType], "A list of all types supported by this server." do
|
6
8
|
resolve -> (obj, arg, ctx) { obj.types.values }
|
7
9
|
end
|
8
10
|
|
9
|
-
field :
|
10
|
-
resolve -> (obj, arg, ctx) { obj.directives.values }
|
11
|
-
end
|
12
|
-
|
13
|
-
field :queryType, !GraphQL::Introspection::TypeType, "The query root of this schema" do
|
11
|
+
field :queryType, !GraphQL::Introspection::TypeType, "The type that query operations will be rooted at." do
|
14
12
|
resolve -> (obj, arg, ctx) { obj.query }
|
15
13
|
end
|
16
14
|
|
17
|
-
field :mutationType, GraphQL::Introspection::TypeType, "
|
15
|
+
field :mutationType, GraphQL::Introspection::TypeType, "If this server supports mutation, the type that mutation operations will be rooted at." do
|
18
16
|
resolve -> (obj, arg, ctx) { obj.mutation }
|
19
17
|
end
|
20
18
|
|
21
|
-
field :subscriptionType, GraphQL::Introspection::TypeType, "
|
19
|
+
field :subscriptionType, GraphQL::Introspection::TypeType, "If this server support subscription, the type that subscription operations will be rooted at." do
|
22
20
|
resolve -> (obj, arg, ctx) { obj.subscription }
|
23
21
|
end
|
22
|
+
|
23
|
+
field :directives, !types[!GraphQL::Introspection::DirectiveType], "A list of all directives supported by this server." do
|
24
|
+
resolve -> (obj, arg, ctx) { obj.directives.values }
|
25
|
+
end
|
24
26
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
GraphQL::Introspection::TypeKindEnum = GraphQL::EnumType.define do
|
2
2
|
name "__TypeKind"
|
3
|
-
description "
|
4
|
-
GraphQL::TypeKinds::
|
5
|
-
value(
|
3
|
+
description "An enum describing what kind of type a given `__Type` is."
|
4
|
+
GraphQL::TypeKinds::TYPE_KINDS.each do |type_kind|
|
5
|
+
value(type_kind.name, type_kind.description)
|
6
6
|
end
|
7
7
|
end
|
@@ -1,16 +1,19 @@
|
|
1
1
|
GraphQL::Introspection::TypeType = GraphQL::ObjectType.define do
|
2
2
|
name "__Type"
|
3
|
-
description "
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
description "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in "\
|
4
|
+
"GraphQL as represented by the `__TypeKind` enum.\n\n"\
|
5
|
+
"Depending on the kind of a type, certain fields describe information about that type. "\
|
6
|
+
"Scalar types provide no information beyond a name and description, while "\
|
7
|
+
"Enum types provide their values. Object and Interface types provide the fields "\
|
8
|
+
"they describe. Abstract types, Union and Interface, provide the Object types "\
|
9
|
+
"possible at runtime. List and NonNull types compose other types."
|
7
10
|
|
11
|
+
field :name, types.String
|
12
|
+
field :description, types.String
|
8
13
|
field :kind do
|
9
14
|
type !GraphQL::Introspection::TypeKindEnum
|
10
|
-
description "The kind of this type"
|
11
15
|
resolve -> (target, a, c) { target.kind.name }
|
12
16
|
end
|
13
|
-
|
14
17
|
field :fields, field: GraphQL::Introspection::FieldsField
|
15
18
|
field :ofType, field: GraphQL::Introspection::OfTypeField
|
16
19
|
field :inputFields, field: GraphQL::Introspection::InputFieldsField
|
@@ -40,7 +40,6 @@ module GraphQL
|
|
40
40
|
out << generate_directives(node.directives)
|
41
41
|
out << generate_selections(node.selections, indent: indent)
|
42
42
|
out
|
43
|
-
|
44
43
|
when Nodes::FragmentSpread
|
45
44
|
out = "#{indent}...#{node.name}"
|
46
45
|
out << generate_directives(node.directives)
|
@@ -123,6 +122,10 @@ module GraphQL
|
|
123
122
|
out << " #{generate(field)}\n"
|
124
123
|
end
|
125
124
|
out << "}"
|
125
|
+
when Nodes::DirectiveDefinition
|
126
|
+
out = "directive @#{node.name}"
|
127
|
+
out << "(#{node.arguments.map { |a| generate(a) }.join(", ")})" if node.arguments.any?
|
128
|
+
out << " on #{node.locations.join(' | ')}"
|
126
129
|
when Nodes::AbstractNode
|
127
130
|
node.to_query_string(indent: indent)
|
128
131
|
when FalseClass, Float, Integer, NilClass, String, TrueClass
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
# line 1 "lib/graphql/language/lexer.rl"
|
3
3
|
|
4
|
-
# line
|
4
|
+
# line 98 "lib/graphql/language/lexer.rl"
|
5
5
|
|
6
6
|
|
7
7
|
|
@@ -30,20 +30,21 @@ class << self
|
|
30
30
|
end
|
31
31
|
self._graphql_lexer_actions = [
|
32
32
|
0, 1, 0, 1, 1, 1, 2, 1,
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
25, 1, 26, 1, 27, 1, 28, 1,
|
34
|
+
29, 1, 30, 1, 31, 1, 32, 1,
|
35
|
+
33, 1, 34, 1, 35, 1, 36, 1,
|
36
|
+
37, 1, 38, 1, 39, 1, 40, 1,
|
37
|
+
41, 1, 42, 1, 43, 1, 44, 1,
|
38
|
+
45, 1, 46, 1, 47, 1, 48, 1,
|
39
|
+
49, 2, 2, 3, 2, 2, 4, 2,
|
40
40
|
2, 5, 2, 2, 6, 2, 2, 7,
|
41
41
|
2, 2, 8, 2, 2, 9, 2, 2,
|
42
42
|
10, 2, 2, 11, 2, 2, 12, 2,
|
43
43
|
2, 13, 2, 2, 14, 2, 2, 15,
|
44
44
|
2, 2, 16, 2, 2, 17, 2, 2,
|
45
45
|
18, 2, 2, 19, 2, 2, 20, 2,
|
46
|
-
2, 21, 2, 2, 22, 2, 2, 23
|
46
|
+
2, 21, 2, 2, 22, 2, 2, 23,
|
47
|
+
2, 2, 24
|
47
48
|
]
|
48
49
|
|
49
50
|
class << self
|
@@ -51,18 +52,19 @@ class << self
|
|
51
52
|
private :_graphql_lexer_key_offsets, :_graphql_lexer_key_offsets=
|
52
53
|
end
|
53
54
|
self._graphql_lexer_key_offsets = [
|
54
|
-
0, 2, 4, 6, 8, 12, 13,
|
55
|
-
|
56
|
-
|
57
|
-
149, 157, 165, 173, 181,
|
58
|
-
214, 222, 230, 238, 246, 254, 262,
|
55
|
+
0, 2, 4, 6, 8, 12, 13, 53,
|
56
|
+
56, 58, 60, 63, 70, 72, 78, 85,
|
57
|
+
86, 93, 101, 109, 117, 125, 133, 141,
|
58
|
+
149, 157, 165, 173, 181, 190, 198, 206,
|
59
|
+
214, 222, 230, 238, 246, 254, 262, 271,
|
59
60
|
279, 287, 295, 303, 311, 319, 327, 335,
|
60
|
-
|
61
|
-
|
62
|
-
472,
|
63
|
-
537,
|
64
|
-
|
65
|
-
666, 674
|
61
|
+
344, 352, 360, 368, 376, 384, 392, 400,
|
62
|
+
408, 416, 424, 432, 440, 448, 456, 464,
|
63
|
+
472, 480, 488, 496, 504, 512, 520, 528,
|
64
|
+
537, 546, 554, 562, 570, 578, 586, 594,
|
65
|
+
602, 610, 618, 626, 634, 642, 650, 658,
|
66
|
+
666, 674, 683, 691, 699, 707, 715, 723,
|
67
|
+
731, 739
|
66
68
|
]
|
67
69
|
|
68
70
|
class << self
|
@@ -74,88 +76,96 @@ self._graphql_lexer_trans_keys = [
|
|
74
76
|
43, 45, 48, 57, 46, 9, 10, 13,
|
75
77
|
32, 33, 34, 35, 36, 40, 41, 44,
|
76
78
|
45, 46, 48, 58, 61, 64, 91, 93,
|
77
|
-
95, 101, 102, 105, 109, 110, 111,
|
78
|
-
115, 116, 117, 123, 124, 125, 49,
|
79
|
-
65, 90, 97, 122, 9, 32, 44,
|
80
|
-
92, 10, 13, 48, 49, 57, 43,
|
81
|
-
46, 69, 101, 48, 57, 48, 57,
|
82
|
-
45, 69, 101, 48, 57, 43, 45,
|
83
|
-
69, 101, 48, 57, 46, 95, 48,
|
84
|
-
65, 90, 97, 122, 95,
|
85
|
-
65, 90, 97, 122, 95,
|
86
|
-
65, 90, 97, 122, 95, 109, 48, 57,
|
87
|
-
65, 90, 97, 122, 95, 97, 114, 48,
|
88
|
-
57, 65, 90, 98, 122, 95, 108, 48,
|
89
|
-
57, 65, 90, 97, 122, 95, 115, 48,
|
79
|
+
95, 100, 101, 102, 105, 109, 110, 111,
|
80
|
+
113, 115, 116, 117, 123, 124, 125, 49,
|
81
|
+
57, 65, 90, 97, 122, 9, 32, 44,
|
82
|
+
34, 92, 10, 13, 48, 49, 57, 43,
|
83
|
+
45, 46, 69, 101, 48, 57, 48, 57,
|
84
|
+
43, 45, 69, 101, 48, 57, 43, 45,
|
85
|
+
46, 69, 101, 48, 57, 46, 95, 48,
|
86
|
+
57, 65, 90, 97, 122, 95, 105, 48,
|
87
|
+
57, 65, 90, 97, 122, 95, 114, 48,
|
90
88
|
57, 65, 90, 97, 122, 95, 101, 48,
|
91
|
-
57, 65, 90, 97, 122, 95,
|
92
|
-
57, 65, 90,
|
93
|
-
57, 65, 90, 97, 122, 95,
|
89
|
+
57, 65, 90, 97, 122, 95, 99, 48,
|
90
|
+
57, 65, 90, 97, 122, 95, 116, 48,
|
91
|
+
57, 65, 90, 97, 122, 95, 105, 48,
|
92
|
+
57, 65, 90, 97, 122, 95, 118, 48,
|
94
93
|
57, 65, 90, 97, 122, 95, 101, 48,
|
95
94
|
57, 65, 90, 97, 122, 95, 110, 48,
|
96
|
-
57, 65, 90, 97, 122, 95,
|
97
|
-
57, 65, 90, 97, 122, 95, 109,
|
98
|
-
|
99
|
-
48, 57, 65, 90,
|
95
|
+
57, 65, 90, 97, 122, 95, 117, 48,
|
96
|
+
57, 65, 90, 97, 122, 95, 109, 48,
|
97
|
+
57, 65, 90, 97, 122, 95, 97, 114,
|
98
|
+
48, 57, 65, 90, 98, 122, 95, 108,
|
99
|
+
48, 57, 65, 90, 97, 122, 95, 115,
|
100
100
|
48, 57, 65, 90, 97, 122, 95, 101,
|
101
|
+
48, 57, 65, 90, 97, 122, 95, 97,
|
102
|
+
48, 57, 65, 90, 98, 122, 95, 103,
|
101
103
|
48, 57, 65, 90, 97, 122, 95, 109,
|
102
104
|
48, 57, 65, 90, 97, 122, 95, 101,
|
103
105
|
48, 57, 65, 90, 97, 122, 95, 110,
|
104
106
|
48, 57, 65, 90, 97, 122, 95, 116,
|
105
|
-
48, 57, 65, 90, 97, 122, 95,
|
106
|
-
48, 57, 65, 90, 97, 122, 95, 112,
|
107
|
-
116, 48, 57, 65, 90, 97, 122, 95,
|
108
|
-
117, 48, 57, 65, 90, 97, 122, 95,
|
109
|
-
116, 48, 57, 65, 90, 97, 122, 95,
|
110
|
-
101, 48, 57, 65, 90, 97, 122, 95,
|
111
|
-
114, 48, 57, 65, 90, 97, 122, 95,
|
112
|
-
102, 48, 57, 65, 90, 97, 122, 95,
|
113
|
-
97, 48, 57, 65, 90, 98, 122, 95,
|
114
|
-
99, 48, 57, 65, 90, 97, 122, 95,
|
115
|
-
101, 48, 57, 65, 90, 97, 122, 95,
|
116
|
-
117, 48, 57, 65, 90, 97, 122, 95,
|
117
|
-
116, 48, 57, 65, 90, 97, 122, 95,
|
118
|
-
97, 48, 57, 65, 90, 98, 122, 95,
|
119
|
-
116, 48, 57, 65, 90, 97, 122, 95,
|
120
|
-
105, 48, 57, 65, 90, 97, 122, 95,
|
121
|
-
111, 48, 57, 65, 90, 97, 122, 95,
|
107
|
+
48, 57, 65, 90, 97, 122, 95, 109,
|
122
108
|
110, 48, 57, 65, 90, 97, 122, 95,
|
123
|
-
|
124
|
-
108, 48, 57, 65, 90, 97, 122, 95,
|
109
|
+
112, 48, 57, 65, 90, 97, 122, 95,
|
125
110
|
108, 48, 57, 65, 90, 97, 122, 95,
|
126
|
-
110, 48, 57, 65, 90, 97, 122, 95,
|
127
|
-
117, 48, 57, 65, 90, 97, 122, 95,
|
128
111
|
101, 48, 57, 65, 90, 97, 122, 95,
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
112
|
+
109, 48, 57, 65, 90, 97, 122, 95,
|
113
|
+
101, 48, 57, 65, 90, 97, 122, 95,
|
114
|
+
110, 48, 57, 65, 90, 97, 122, 95,
|
115
|
+
116, 48, 57, 65, 90, 97, 122, 95,
|
116
|
+
115, 48, 57, 65, 90, 97, 122, 95,
|
117
|
+
112, 116, 48, 57, 65, 90, 97, 122,
|
118
|
+
95, 117, 48, 57, 65, 90, 97, 122,
|
119
|
+
95, 116, 48, 57, 65, 90, 97, 122,
|
120
|
+
95, 101, 48, 57, 65, 90, 97, 122,
|
121
|
+
95, 114, 48, 57, 65, 90, 97, 122,
|
122
|
+
95, 102, 48, 57, 65, 90, 97, 122,
|
123
|
+
95, 97, 48, 57, 65, 90, 98, 122,
|
124
|
+
95, 99, 48, 57, 65, 90, 97, 122,
|
125
|
+
95, 101, 48, 57, 65, 90, 97, 122,
|
126
|
+
95, 117, 48, 57, 65, 90, 97, 122,
|
127
|
+
95, 116, 48, 57, 65, 90, 97, 122,
|
128
|
+
95, 97, 48, 57, 65, 90, 98, 122,
|
129
|
+
95, 116, 48, 57, 65, 90, 97, 122,
|
130
|
+
95, 105, 48, 57, 65, 90, 97, 122,
|
131
|
+
95, 111, 48, 57, 65, 90, 97, 122,
|
132
|
+
95, 110, 48, 57, 65, 90, 97, 122,
|
133
|
+
95, 117, 48, 57, 65, 90, 97, 122,
|
134
|
+
95, 108, 48, 57, 65, 90, 97, 122,
|
135
|
+
95, 108, 48, 57, 65, 90, 97, 122,
|
136
|
+
95, 110, 48, 57, 65, 90, 97, 122,
|
137
|
+
95, 117, 48, 57, 65, 90, 97, 122,
|
138
|
+
95, 101, 48, 57, 65, 90, 97, 122,
|
139
|
+
95, 114, 48, 57, 65, 90, 97, 122,
|
140
|
+
95, 121, 48, 57, 65, 90, 97, 122,
|
141
|
+
95, 99, 117, 48, 57, 65, 90, 97,
|
142
|
+
122, 95, 97, 104, 48, 57, 65, 90,
|
143
|
+
98, 122, 95, 108, 48, 57, 65, 90,
|
144
|
+
97, 122, 95, 97, 48, 57, 65, 90,
|
145
|
+
98, 122, 95, 114, 48, 57, 65, 90,
|
151
146
|
97, 122, 95, 101, 48, 57, 65, 90,
|
147
|
+
97, 122, 95, 109, 48, 57, 65, 90,
|
148
|
+
97, 122, 95, 97, 48, 57, 65, 90,
|
149
|
+
98, 122, 95, 98, 48, 57, 65, 90,
|
150
|
+
97, 122, 95, 115, 48, 57, 65, 90,
|
151
|
+
97, 122, 95, 99, 48, 57, 65, 90,
|
152
|
+
97, 122, 95, 114, 48, 57, 65, 90,
|
153
|
+
97, 122, 95, 105, 48, 57, 65, 90,
|
152
154
|
97, 122, 95, 112, 48, 57, 65, 90,
|
153
|
-
97, 122, 95,
|
154
|
-
97, 122, 95, 110, 48, 57, 65, 90,
|
155
|
+
97, 122, 95, 116, 48, 57, 65, 90,
|
155
156
|
97, 122, 95, 105, 48, 57, 65, 90,
|
156
157
|
97, 122, 95, 111, 48, 57, 65, 90,
|
157
158
|
97, 122, 95, 110, 48, 57, 65, 90,
|
158
|
-
97, 122,
|
159
|
+
97, 122, 95, 114, 121, 48, 57, 65,
|
160
|
+
90, 97, 122, 95, 117, 48, 57, 65,
|
161
|
+
90, 97, 122, 95, 101, 48, 57, 65,
|
162
|
+
90, 97, 122, 95, 112, 48, 57, 65,
|
163
|
+
90, 97, 122, 95, 101, 48, 57, 65,
|
164
|
+
90, 97, 122, 95, 110, 48, 57, 65,
|
165
|
+
90, 97, 122, 95, 105, 48, 57, 65,
|
166
|
+
90, 97, 122, 95, 111, 48, 57, 65,
|
167
|
+
90, 97, 122, 95, 110, 48, 57, 65,
|
168
|
+
90, 97, 122, 0
|
159
169
|
]
|
160
170
|
|
161
171
|
class << self
|
@@ -163,9 +173,10 @@ class << self
|
|
163
173
|
private :_graphql_lexer_single_lengths, :_graphql_lexer_single_lengths=
|
164
174
|
end
|
165
175
|
self._graphql_lexer_single_lengths = [
|
166
|
-
2, 2, 0, 0, 2, 1,
|
176
|
+
2, 2, 0, 0, 2, 1, 34, 3,
|
167
177
|
2, 2, 1, 5, 0, 4, 5, 1,
|
168
|
-
1, 2, 2, 2,
|
178
|
+
1, 2, 2, 2, 2, 2, 2, 2,
|
179
|
+
2, 2, 2, 2, 3, 2, 2, 2,
|
169
180
|
2, 2, 2, 2, 2, 2, 3, 2,
|
170
181
|
2, 2, 2, 2, 2, 2, 2, 3,
|
171
182
|
2, 2, 2, 2, 2, 2, 2, 2,
|
@@ -193,6 +204,7 @@ self._graphql_lexer_range_lengths = [
|
|
193
204
|
3, 3, 3, 3, 3, 3, 3, 3,
|
194
205
|
3, 3, 3, 3, 3, 3, 3, 3,
|
195
206
|
3, 3, 3, 3, 3, 3, 3, 3,
|
207
|
+
3, 3, 3, 3, 3, 3, 3, 3,
|
196
208
|
3, 3
|
197
209
|
]
|
198
210
|
|
@@ -201,18 +213,19 @@ class << self
|
|
201
213
|
private :_graphql_lexer_index_offsets, :_graphql_lexer_index_offsets=
|
202
214
|
end
|
203
215
|
self._graphql_lexer_index_offsets = [
|
204
|
-
0, 3, 6, 8, 10, 14, 16,
|
205
|
-
|
206
|
-
|
207
|
-
138, 144, 150, 156, 162,
|
208
|
-
187, 193, 199, 205, 211, 217, 223,
|
216
|
+
0, 3, 6, 8, 10, 14, 16, 54,
|
217
|
+
58, 61, 64, 67, 74, 76, 82, 89,
|
218
|
+
91, 96, 102, 108, 114, 120, 126, 132,
|
219
|
+
138, 144, 150, 156, 162, 169, 175, 181,
|
220
|
+
187, 193, 199, 205, 211, 217, 223, 230,
|
209
221
|
236, 242, 248, 254, 260, 266, 272, 278,
|
210
|
-
|
211
|
-
|
212
|
-
381,
|
213
|
-
430,
|
214
|
-
|
215
|
-
527, 533
|
222
|
+
285, 291, 297, 303, 309, 315, 321, 327,
|
223
|
+
333, 339, 345, 351, 357, 363, 369, 375,
|
224
|
+
381, 387, 393, 399, 405, 411, 417, 423,
|
225
|
+
430, 437, 443, 449, 455, 461, 467, 473,
|
226
|
+
479, 485, 491, 497, 503, 509, 515, 521,
|
227
|
+
527, 533, 540, 546, 552, 558, 564, 570,
|
228
|
+
576, 582
|
216
229
|
]
|
217
230
|
|
218
231
|
class << self
|
@@ -224,70 +237,76 @@ self._graphql_lexer_trans_targs = [
|
|
224
237
|
13, 6, 2, 2, 12, 6, 6, 6,
|
225
238
|
7, 6, 6, 7, 6, 8, 9, 6,
|
226
239
|
6, 6, 7, 10, 15, 11, 6, 6,
|
227
|
-
6, 6, 6, 16, 17,
|
228
|
-
|
229
|
-
6, 14, 16, 16, 6, 7, 7,
|
230
|
-
6, 6, 1, 0, 6, 6, 9,
|
231
|
-
14, 6, 2, 2, 3, 4, 4,
|
232
|
-
6, 12, 6, 2, 2, 4, 4,
|
233
|
-
6, 2, 2, 3, 4, 4, 14,
|
234
|
-
5, 6, 16, 16, 16, 16, 6,
|
235
|
-
18, 16, 16, 16, 6, 16, 19,
|
236
|
-
16, 16,
|
237
|
-
6, 16, 21,
|
240
|
+
6, 6, 6, 16, 17, 25, 28, 38,
|
241
|
+
56, 63, 66, 67, 71, 89, 94, 6,
|
242
|
+
6, 6, 14, 16, 16, 6, 7, 7,
|
243
|
+
7, 6, 6, 1, 0, 6, 6, 9,
|
244
|
+
11, 14, 6, 2, 2, 3, 4, 4,
|
245
|
+
12, 6, 12, 6, 2, 2, 4, 4,
|
246
|
+
13, 6, 2, 2, 3, 4, 4, 14,
|
247
|
+
6, 5, 6, 16, 16, 16, 16, 6,
|
248
|
+
16, 18, 16, 16, 16, 6, 16, 19,
|
249
|
+
16, 16, 16, 6, 16, 20, 16, 16,
|
250
|
+
16, 6, 16, 21, 16, 16, 16, 6,
|
238
251
|
16, 22, 16, 16, 16, 6, 16, 23,
|
239
|
-
16, 16, 16, 6, 16,
|
240
|
-
16, 6, 16,
|
252
|
+
16, 16, 16, 6, 16, 24, 16, 16,
|
253
|
+
16, 6, 16, 16, 16, 16, 16, 6,
|
241
254
|
16, 26, 16, 16, 16, 6, 16, 27,
|
242
|
-
16, 16, 16, 6, 16,
|
243
|
-
16, 6, 16, 29,
|
244
|
-
|
245
|
-
|
255
|
+
16, 16, 16, 6, 16, 16, 16, 16,
|
256
|
+
16, 6, 16, 29, 32, 16, 16, 16,
|
257
|
+
6, 16, 30, 16, 16, 16, 6, 16,
|
258
|
+
31, 16, 16, 16, 6, 16, 16, 16,
|
246
259
|
16, 16, 6, 16, 33, 16, 16, 16,
|
247
260
|
6, 16, 34, 16, 16, 16, 6, 16,
|
248
261
|
35, 16, 16, 16, 6, 16, 36, 16,
|
249
262
|
16, 16, 6, 16, 37, 16, 16, 16,
|
250
|
-
6, 16,
|
251
|
-
|
263
|
+
6, 16, 16, 16, 16, 16, 6, 16,
|
264
|
+
39, 47, 16, 16, 16, 6, 16, 40,
|
252
265
|
16, 16, 16, 6, 16, 41, 16, 16,
|
253
|
-
16, 6, 16,
|
266
|
+
16, 6, 16, 42, 16, 16, 16, 6,
|
254
267
|
16, 43, 16, 16, 16, 6, 16, 44,
|
255
268
|
16, 16, 16, 6, 16, 45, 16, 16,
|
256
269
|
16, 6, 16, 46, 16, 16, 16, 6,
|
257
|
-
16,
|
258
|
-
16, 16, 16, 6, 16, 49, 16,
|
259
|
-
16, 6, 16,
|
260
|
-
16, 51, 16, 16, 16, 6, 16,
|
261
|
-
16, 16, 16, 6, 16, 53, 16,
|
262
|
-
16, 6, 16, 54, 16, 16, 16,
|
263
|
-
|
264
|
-
16, 16, 16, 6, 16, 57, 16,
|
265
|
-
16, 6, 16,
|
266
|
-
|
267
|
-
16, 16, 16, 6, 16, 61, 16,
|
268
|
-
16, 6, 16, 62, 16, 16, 16,
|
269
|
-
16, 16, 16, 16, 16, 6, 16,
|
270
|
-
|
271
|
-
16, 16,
|
272
|
-
|
273
|
-
|
274
|
-
16, 16,
|
275
|
-
|
276
|
-
|
277
|
-
16, 16, 16, 6, 16, 74, 16,
|
278
|
-
16, 6, 16, 75, 16, 16, 16,
|
279
|
-
16, 76, 16, 16, 16, 6, 16, 77,
|
280
|
-
16, 16, 16, 6, 16, 78, 16, 16,
|
281
|
-
16, 6, 16, 79, 16, 16, 16, 6,
|
282
|
-
16, 80, 16, 16, 16, 6, 16, 16,
|
283
|
-
16, 16, 16, 6, 16, 82, 84, 16,
|
284
|
-
16, 16, 6, 16, 83, 16, 16, 16,
|
270
|
+
16, 16, 16, 16, 16, 6, 16, 48,
|
271
|
+
50, 16, 16, 16, 6, 16, 49, 16,
|
272
|
+
16, 16, 6, 16, 16, 16, 16, 16,
|
273
|
+
6, 16, 51, 16, 16, 16, 6, 16,
|
274
|
+
52, 16, 16, 16, 6, 16, 53, 16,
|
275
|
+
16, 16, 6, 16, 54, 16, 16, 16,
|
276
|
+
6, 16, 55, 16, 16, 16, 6, 16,
|
277
|
+
16, 16, 16, 16, 6, 16, 57, 16,
|
278
|
+
16, 16, 6, 16, 58, 16, 16, 16,
|
279
|
+
6, 16, 59, 16, 16, 16, 6, 16,
|
280
|
+
60, 16, 16, 16, 6, 16, 61, 16,
|
281
|
+
16, 16, 6, 16, 62, 16, 16, 16,
|
282
|
+
6, 16, 16, 16, 16, 16, 6, 16,
|
283
|
+
64, 16, 16, 16, 6, 16, 65, 16,
|
284
|
+
16, 16, 6, 16, 16, 16, 16, 16,
|
285
|
+
6, 16, 16, 16, 16, 16, 6, 16,
|
286
|
+
68, 16, 16, 16, 6, 16, 69, 16,
|
287
|
+
16, 16, 6, 16, 70, 16, 16, 16,
|
288
|
+
6, 16, 16, 16, 16, 16, 6, 16,
|
289
|
+
72, 79, 16, 16, 16, 6, 16, 73,
|
290
|
+
76, 16, 16, 16, 6, 16, 74, 16,
|
291
|
+
16, 16, 6, 16, 75, 16, 16, 16,
|
285
292
|
6, 16, 16, 16, 16, 16, 6, 16,
|
286
|
-
|
293
|
+
77, 16, 16, 16, 6, 16, 78, 16,
|
294
|
+
16, 16, 6, 16, 16, 16, 16, 16,
|
295
|
+
6, 16, 80, 16, 16, 16, 6, 16,
|
296
|
+
81, 16, 16, 16, 6, 16, 82, 16,
|
297
|
+
16, 16, 6, 16, 83, 16, 16, 16,
|
298
|
+
6, 16, 84, 16, 16, 16, 6, 16,
|
299
|
+
85, 16, 16, 16, 6, 16, 86, 16,
|
287
300
|
16, 16, 6, 16, 87, 16, 16, 16,
|
288
301
|
6, 16, 88, 16, 16, 16, 6, 16,
|
289
|
-
|
290
|
-
16, 16,
|
302
|
+
16, 16, 16, 16, 6, 16, 90, 92,
|
303
|
+
16, 16, 16, 6, 16, 91, 16, 16,
|
304
|
+
16, 6, 16, 16, 16, 16, 16, 6,
|
305
|
+
16, 93, 16, 16, 16, 6, 16, 16,
|
306
|
+
16, 16, 16, 6, 16, 95, 16, 16,
|
307
|
+
16, 6, 16, 96, 16, 16, 16, 6,
|
308
|
+
16, 97, 16, 16, 16, 6, 16, 16,
|
309
|
+
16, 16, 16, 6, 6, 6, 6, 6,
|
291
310
|
6, 6, 6, 6, 6, 6, 6, 6,
|
292
311
|
6, 6, 6, 6, 6, 6, 6, 6,
|
293
312
|
6, 6, 6, 6, 6, 6, 6, 6,
|
@@ -298,7 +317,8 @@ self._graphql_lexer_trans_targs = [
|
|
298
317
|
6, 6, 6, 6, 6, 6, 6, 6,
|
299
318
|
6, 6, 6, 6, 6, 6, 6, 6,
|
300
319
|
6, 6, 6, 6, 6, 6, 6, 6,
|
301
|
-
6, 6, 6, 6,
|
320
|
+
6, 6, 6, 6, 6, 6, 6, 6,
|
321
|
+
6, 6, 6, 6, 6, 0
|
302
322
|
]
|
303
323
|
|
304
324
|
class << self
|
@@ -306,76 +326,83 @@ class << self
|
|
306
326
|
private :_graphql_lexer_trans_actions, :_graphql_lexer_trans_actions=
|
307
327
|
end
|
308
328
|
self._graphql_lexer_trans_actions = [
|
309
|
-
21, 0, 0,
|
329
|
+
21, 0, 0, 114, 0, 0, 0, 55,
|
310
330
|
60, 51, 0, 0, 0, 55, 27, 53,
|
311
|
-
0, 35, 35, 0, 31,
|
312
|
-
|
313
|
-
25,
|
314
|
-
0, 0, 0, 0, 0, 0,
|
315
|
-
|
316
|
-
45, 21, 0, 0, 47, 47, 0,
|
317
|
-
57,
|
318
|
-
39, 0, 41, 0, 0, 0, 0,
|
319
|
-
41, 0, 0, 0, 0, 0, 57,
|
320
|
-
0, 49,
|
321
|
-
0,
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
0,
|
332
|
-
|
333
|
-
43,
|
334
|
-
0,
|
335
|
-
|
336
|
-
43,
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
0,
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
43,
|
372
|
-
0,
|
373
|
-
|
374
|
-
43,
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
331
|
+
0, 35, 35, 0, 31, 120, 0, 23,
|
332
|
+
13, 11, 0, 0, 5, 57, 19, 29,
|
333
|
+
25, 17, 15, 117, 0, 0, 0, 0,
|
334
|
+
0, 0, 0, 0, 0, 0, 0, 9,
|
335
|
+
33, 7, 57, 117, 117, 37, 0, 0,
|
336
|
+
0, 45, 21, 0, 0, 47, 47, 0,
|
337
|
+
57, 57, 49, 0, 0, 0, 0, 0,
|
338
|
+
0, 39, 0, 41, 0, 0, 0, 0,
|
339
|
+
60, 41, 0, 0, 0, 0, 0, 57,
|
340
|
+
39, 0, 49, 117, 117, 117, 117, 55,
|
341
|
+
117, 0, 117, 117, 117, 43, 117, 0,
|
342
|
+
117, 117, 117, 43, 117, 0, 117, 117,
|
343
|
+
117, 43, 117, 0, 117, 117, 117, 43,
|
344
|
+
117, 0, 117, 117, 117, 43, 117, 0,
|
345
|
+
117, 117, 117, 43, 117, 0, 117, 117,
|
346
|
+
117, 43, 117, 111, 117, 117, 117, 43,
|
347
|
+
117, 0, 117, 117, 117, 43, 117, 0,
|
348
|
+
117, 117, 117, 43, 117, 105, 117, 117,
|
349
|
+
117, 43, 117, 0, 0, 117, 117, 117,
|
350
|
+
43, 117, 0, 117, 117, 117, 43, 117,
|
351
|
+
0, 117, 117, 117, 43, 117, 72, 117,
|
352
|
+
117, 117, 43, 117, 0, 117, 117, 117,
|
353
|
+
43, 117, 0, 117, 117, 117, 43, 117,
|
354
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
355
|
+
117, 117, 43, 117, 0, 117, 117, 117,
|
356
|
+
43, 117, 66, 117, 117, 117, 43, 117,
|
357
|
+
0, 0, 117, 117, 117, 43, 117, 0,
|
358
|
+
117, 117, 117, 43, 117, 0, 117, 117,
|
359
|
+
117, 43, 117, 0, 117, 117, 117, 43,
|
360
|
+
117, 0, 117, 117, 117, 43, 117, 0,
|
361
|
+
117, 117, 117, 43, 117, 0, 117, 117,
|
362
|
+
117, 43, 117, 0, 117, 117, 117, 43,
|
363
|
+
117, 96, 117, 117, 117, 43, 117, 0,
|
364
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
365
|
+
117, 117, 43, 117, 108, 117, 117, 117,
|
366
|
+
43, 117, 0, 117, 117, 117, 43, 117,
|
367
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
368
|
+
117, 117, 43, 117, 0, 117, 117, 117,
|
369
|
+
43, 117, 0, 117, 117, 117, 43, 117,
|
370
|
+
99, 117, 117, 117, 43, 117, 0, 117,
|
371
|
+
117, 117, 43, 117, 0, 117, 117, 117,
|
372
|
+
43, 117, 0, 117, 117, 117, 43, 117,
|
373
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
374
|
+
117, 117, 43, 117, 0, 117, 117, 117,
|
375
|
+
43, 117, 81, 117, 117, 117, 43, 117,
|
376
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
377
|
+
117, 117, 43, 117, 75, 117, 117, 117,
|
378
|
+
43, 117, 63, 117, 117, 117, 43, 117,
|
379
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
380
|
+
117, 117, 43, 117, 0, 117, 117, 117,
|
381
|
+
43, 117, 78, 117, 117, 117, 43, 117,
|
382
|
+
0, 0, 117, 117, 117, 43, 117, 0,
|
383
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
384
|
+
117, 117, 43, 117, 0, 117, 117, 117,
|
385
|
+
43, 117, 90, 117, 117, 117, 43, 117,
|
386
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
387
|
+
117, 117, 43, 117, 87, 117, 117, 117,
|
388
|
+
43, 117, 0, 117, 117, 117, 43, 117,
|
389
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
390
|
+
117, 117, 43, 117, 0, 117, 117, 117,
|
391
|
+
43, 117, 0, 117, 117, 117, 43, 117,
|
392
|
+
0, 117, 117, 117, 43, 117, 0, 117,
|
393
|
+
117, 117, 43, 117, 0, 117, 117, 117,
|
394
|
+
43, 117, 0, 117, 117, 117, 43, 117,
|
395
|
+
84, 117, 117, 117, 43, 117, 0, 0,
|
396
|
+
117, 117, 117, 43, 117, 0, 117, 117,
|
397
|
+
117, 43, 117, 69, 117, 117, 117, 43,
|
398
|
+
117, 0, 117, 117, 117, 43, 117, 93,
|
399
|
+
117, 117, 117, 43, 117, 0, 117, 117,
|
400
|
+
117, 43, 117, 0, 117, 117, 117, 43,
|
401
|
+
117, 0, 117, 117, 117, 43, 117, 102,
|
402
|
+
117, 117, 117, 43, 55, 55, 55, 51,
|
403
|
+
55, 53, 45, 55, 47, 49, 39, 41,
|
404
|
+
41, 39, 49, 55, 43, 43, 43, 43,
|
405
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
379
406
|
43, 43, 43, 43, 43, 43, 43, 43,
|
380
407
|
43, 43, 43, 43, 43, 43, 43, 43,
|
381
408
|
43, 43, 43, 43, 43, 43, 43, 43,
|
@@ -384,7 +411,7 @@ self._graphql_lexer_trans_actions = [
|
|
384
411
|
43, 43, 43, 43, 43, 43, 43, 43,
|
385
412
|
43, 43, 43, 43, 43, 43, 43, 43,
|
386
413
|
43, 43, 43, 43, 43, 43, 43, 43,
|
387
|
-
43, 43, 43, 43, 0
|
414
|
+
43, 43, 43, 43, 43, 0
|
388
415
|
]
|
389
416
|
|
390
417
|
class << self
|
@@ -403,6 +430,7 @@ self._graphql_lexer_to_state_actions = [
|
|
403
430
|
0, 0, 0, 0, 0, 0, 0, 0,
|
404
431
|
0, 0, 0, 0, 0, 0, 0, 0,
|
405
432
|
0, 0, 0, 0, 0, 0, 0, 0,
|
433
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
406
434
|
0, 0
|
407
435
|
]
|
408
436
|
|
@@ -422,6 +450,7 @@ self._graphql_lexer_from_state_actions = [
|
|
422
450
|
0, 0, 0, 0, 0, 0, 0, 0,
|
423
451
|
0, 0, 0, 0, 0, 0, 0, 0,
|
424
452
|
0, 0, 0, 0, 0, 0, 0, 0,
|
453
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
425
454
|
0, 0
|
426
455
|
]
|
427
456
|
|
@@ -430,18 +459,19 @@ class << self
|
|
430
459
|
private :_graphql_lexer_eof_trans, :_graphql_lexer_eof_trans=
|
431
460
|
end
|
432
461
|
self._graphql_lexer_eof_trans = [
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
462
|
+
604, 604, 604, 592, 604, 594, 0, 595,
|
463
|
+
604, 597, 603, 602, 601, 601, 602, 603,
|
464
|
+
604, 685, 685, 685, 685, 685, 685, 685,
|
465
|
+
685, 685, 685, 685, 685, 685, 685, 685,
|
466
|
+
685, 685, 685, 685, 685, 685, 685, 685,
|
467
|
+
685, 685, 685, 685, 685, 685, 685, 685,
|
468
|
+
685, 685, 685, 685, 685, 685, 685, 685,
|
469
|
+
685, 685, 685, 685, 685, 685, 685, 685,
|
470
|
+
685, 685, 685, 685, 685, 685, 685, 685,
|
471
|
+
685, 685, 685, 685, 685, 685, 685, 685,
|
472
|
+
685, 685, 685, 685, 685, 685, 685, 685,
|
473
|
+
685, 685, 685, 685, 685, 685, 685, 685,
|
474
|
+
685, 685
|
445
475
|
]
|
446
476
|
|
447
477
|
class << self
|
@@ -463,7 +493,7 @@ end
|
|
463
493
|
self.graphql_lexer_en_main = 6;
|
464
494
|
|
465
495
|
|
466
|
-
# line
|
496
|
+
# line 119 "lib/graphql/language/lexer.rl"
|
467
497
|
|
468
498
|
def self.run_lexer(query_string)
|
469
499
|
data = query_string.unpack("c*")
|
@@ -477,7 +507,7 @@ self.graphql_lexer_en_main = 6;
|
|
477
507
|
}
|
478
508
|
|
479
509
|
|
480
|
-
# line
|
510
|
+
# line 511 "lib/graphql/language/lexer.rb"
|
481
511
|
begin
|
482
512
|
p ||= 0
|
483
513
|
pe ||= data.length
|
@@ -487,14 +517,14 @@ begin
|
|
487
517
|
act = 0
|
488
518
|
end
|
489
519
|
|
490
|
-
# line
|
520
|
+
# line 132 "lib/graphql/language/lexer.rl"
|
491
521
|
|
492
522
|
emit_token = -> (name) {
|
493
523
|
emit(name, ts, te, meta)
|
494
524
|
}
|
495
525
|
|
496
526
|
|
497
|
-
# line
|
527
|
+
# line 528 "lib/graphql/language/lexer.rb"
|
498
528
|
begin
|
499
529
|
_klen, _trans, _keys, _acts, _nacts = nil
|
500
530
|
_goto_level = 0
|
@@ -524,7 +554,7 @@ begin
|
|
524
554
|
begin
|
525
555
|
ts = p
|
526
556
|
end
|
527
|
-
# line
|
557
|
+
# line 558 "lib/graphql/language/lexer.rb"
|
528
558
|
end # from state action switch
|
529
559
|
end
|
530
560
|
if _trigger_goto
|
@@ -596,175 +626,179 @@ when 2 then
|
|
596
626
|
te = p+1
|
597
627
|
end
|
598
628
|
when 3 then
|
599
|
-
# line
|
629
|
+
# line 52 "lib/graphql/language/lexer.rl"
|
600
630
|
begin
|
601
631
|
act = 1; end
|
602
632
|
when 4 then
|
603
|
-
# line
|
633
|
+
# line 53 "lib/graphql/language/lexer.rl"
|
604
634
|
begin
|
605
635
|
act = 2; end
|
606
636
|
when 5 then
|
607
|
-
# line
|
637
|
+
# line 54 "lib/graphql/language/lexer.rl"
|
608
638
|
begin
|
609
639
|
act = 3; end
|
610
640
|
when 6 then
|
611
|
-
# line
|
641
|
+
# line 55 "lib/graphql/language/lexer.rl"
|
612
642
|
begin
|
613
643
|
act = 4; end
|
614
644
|
when 7 then
|
615
|
-
# line
|
645
|
+
# line 56 "lib/graphql/language/lexer.rl"
|
616
646
|
begin
|
617
647
|
act = 5; end
|
618
648
|
when 8 then
|
619
|
-
# line
|
649
|
+
# line 57 "lib/graphql/language/lexer.rl"
|
620
650
|
begin
|
621
651
|
act = 6; end
|
622
652
|
when 9 then
|
623
|
-
# line
|
653
|
+
# line 58 "lib/graphql/language/lexer.rl"
|
624
654
|
begin
|
625
655
|
act = 7; end
|
626
656
|
when 10 then
|
627
|
-
# line
|
657
|
+
# line 59 "lib/graphql/language/lexer.rl"
|
628
658
|
begin
|
629
659
|
act = 8; end
|
630
660
|
when 11 then
|
631
|
-
# line
|
661
|
+
# line 60 "lib/graphql/language/lexer.rl"
|
632
662
|
begin
|
633
663
|
act = 9; end
|
634
664
|
when 12 then
|
635
|
-
# line
|
665
|
+
# line 61 "lib/graphql/language/lexer.rl"
|
636
666
|
begin
|
637
667
|
act = 10; end
|
638
668
|
when 13 then
|
639
|
-
# line
|
669
|
+
# line 62 "lib/graphql/language/lexer.rl"
|
640
670
|
begin
|
641
671
|
act = 11; end
|
642
672
|
when 14 then
|
643
|
-
# line
|
673
|
+
# line 63 "lib/graphql/language/lexer.rl"
|
644
674
|
begin
|
645
675
|
act = 12; end
|
646
676
|
when 15 then
|
647
|
-
# line
|
677
|
+
# line 64 "lib/graphql/language/lexer.rl"
|
648
678
|
begin
|
649
679
|
act = 13; end
|
650
680
|
when 16 then
|
651
|
-
# line
|
681
|
+
# line 65 "lib/graphql/language/lexer.rl"
|
652
682
|
begin
|
653
683
|
act = 14; end
|
654
684
|
when 17 then
|
655
|
-
# line
|
685
|
+
# line 66 "lib/graphql/language/lexer.rl"
|
656
686
|
begin
|
657
687
|
act = 15; end
|
658
688
|
when 18 then
|
659
|
-
# line
|
689
|
+
# line 67 "lib/graphql/language/lexer.rl"
|
660
690
|
begin
|
661
691
|
act = 16; end
|
662
692
|
when 19 then
|
663
|
-
# line
|
693
|
+
# line 68 "lib/graphql/language/lexer.rl"
|
664
694
|
begin
|
665
695
|
act = 17; end
|
666
696
|
when 20 then
|
667
|
-
# line
|
697
|
+
# line 69 "lib/graphql/language/lexer.rl"
|
668
698
|
begin
|
669
699
|
act = 18; end
|
670
700
|
when 21 then
|
671
|
-
# line
|
701
|
+
# line 70 "lib/graphql/language/lexer.rl"
|
672
702
|
begin
|
673
|
-
act =
|
703
|
+
act = 19; end
|
674
704
|
when 22 then
|
675
|
-
# line
|
705
|
+
# line 78 "lib/graphql/language/lexer.rl"
|
676
706
|
begin
|
677
|
-
act =
|
707
|
+
act = 27; end
|
678
708
|
when 23 then
|
679
|
-
# line
|
709
|
+
# line 85 "lib/graphql/language/lexer.rl"
|
680
710
|
begin
|
681
|
-
act =
|
711
|
+
act = 34; end
|
682
712
|
when 24 then
|
683
|
-
# line
|
713
|
+
# line 95 "lib/graphql/language/lexer.rl"
|
714
|
+
begin
|
715
|
+
act = 38; end
|
716
|
+
when 25 then
|
717
|
+
# line 71 "lib/graphql/language/lexer.rl"
|
684
718
|
begin
|
685
719
|
te = p+1
|
686
720
|
begin emit_token.call(:RCURLY) end
|
687
721
|
end
|
688
|
-
when
|
689
|
-
# line
|
722
|
+
when 26 then
|
723
|
+
# line 72 "lib/graphql/language/lexer.rl"
|
690
724
|
begin
|
691
725
|
te = p+1
|
692
726
|
begin emit_token.call(:LCURLY) end
|
693
727
|
end
|
694
|
-
when
|
695
|
-
# line
|
728
|
+
when 27 then
|
729
|
+
# line 73 "lib/graphql/language/lexer.rl"
|
696
730
|
begin
|
697
731
|
te = p+1
|
698
732
|
begin emit_token.call(:RPAREN) end
|
699
733
|
end
|
700
|
-
when
|
701
|
-
# line
|
734
|
+
when 28 then
|
735
|
+
# line 74 "lib/graphql/language/lexer.rl"
|
702
736
|
begin
|
703
737
|
te = p+1
|
704
738
|
begin emit_token.call(:LPAREN) end
|
705
739
|
end
|
706
|
-
when
|
707
|
-
# line
|
740
|
+
when 29 then
|
741
|
+
# line 75 "lib/graphql/language/lexer.rl"
|
708
742
|
begin
|
709
743
|
te = p+1
|
710
744
|
begin emit_token.call(:RBRACKET) end
|
711
745
|
end
|
712
|
-
when
|
713
|
-
# line
|
746
|
+
when 30 then
|
747
|
+
# line 76 "lib/graphql/language/lexer.rl"
|
714
748
|
begin
|
715
749
|
te = p+1
|
716
750
|
begin emit_token.call(:LBRACKET) end
|
717
751
|
end
|
718
|
-
when
|
719
|
-
# line
|
752
|
+
when 31 then
|
753
|
+
# line 77 "lib/graphql/language/lexer.rl"
|
720
754
|
begin
|
721
755
|
te = p+1
|
722
756
|
begin emit_token.call(:COLON) end
|
723
757
|
end
|
724
|
-
when
|
725
|
-
# line
|
758
|
+
when 32 then
|
759
|
+
# line 78 "lib/graphql/language/lexer.rl"
|
726
760
|
begin
|
727
761
|
te = p+1
|
728
762
|
begin emit_string(ts + 1, te - 1, meta) end
|
729
763
|
end
|
730
|
-
when
|
731
|
-
# line
|
764
|
+
when 33 then
|
765
|
+
# line 79 "lib/graphql/language/lexer.rl"
|
732
766
|
begin
|
733
767
|
te = p+1
|
734
768
|
begin emit_token.call(:VAR_SIGN) end
|
735
769
|
end
|
736
|
-
when
|
737
|
-
# line
|
770
|
+
when 34 then
|
771
|
+
# line 80 "lib/graphql/language/lexer.rl"
|
738
772
|
begin
|
739
773
|
te = p+1
|
740
774
|
begin emit_token.call(:DIR_SIGN) end
|
741
775
|
end
|
742
|
-
when
|
743
|
-
# line
|
776
|
+
when 35 then
|
777
|
+
# line 81 "lib/graphql/language/lexer.rl"
|
744
778
|
begin
|
745
779
|
te = p+1
|
746
780
|
begin emit_token.call(:ELLIPSIS) end
|
747
781
|
end
|
748
|
-
when
|
749
|
-
# line
|
782
|
+
when 36 then
|
783
|
+
# line 82 "lib/graphql/language/lexer.rl"
|
750
784
|
begin
|
751
785
|
te = p+1
|
752
786
|
begin emit_token.call(:EQUALS) end
|
753
787
|
end
|
754
|
-
when
|
755
|
-
# line
|
788
|
+
when 37 then
|
789
|
+
# line 83 "lib/graphql/language/lexer.rl"
|
756
790
|
begin
|
757
791
|
te = p+1
|
758
792
|
begin emit_token.call(:BANG) end
|
759
793
|
end
|
760
|
-
when
|
761
|
-
# line
|
794
|
+
when 38 then
|
795
|
+
# line 84 "lib/graphql/language/lexer.rl"
|
762
796
|
begin
|
763
797
|
te = p+1
|
764
798
|
begin emit_token.call(:PIPE) end
|
765
799
|
end
|
766
|
-
when
|
767
|
-
# line
|
800
|
+
when 39 then
|
801
|
+
# line 87 "lib/graphql/language/lexer.rl"
|
768
802
|
begin
|
769
803
|
te = p+1
|
770
804
|
begin
|
@@ -772,38 +806,32 @@ te = p+1
|
|
772
806
|
meta[:col] = 1
|
773
807
|
end
|
774
808
|
end
|
775
|
-
when
|
776
|
-
# line
|
809
|
+
when 40 then
|
810
|
+
# line 95 "lib/graphql/language/lexer.rl"
|
777
811
|
begin
|
778
812
|
te = p+1
|
779
813
|
begin emit_token.call(:UNKNOWN_CHAR) end
|
780
814
|
end
|
781
|
-
when 40 then
|
782
|
-
# line 51 "lib/graphql/language/lexer.rl"
|
783
|
-
begin
|
784
|
-
te = p
|
785
|
-
p = p - 1; begin emit_token.call(:INT) end
|
786
|
-
end
|
787
815
|
when 41 then
|
788
816
|
# line 52 "lib/graphql/language/lexer.rl"
|
789
817
|
begin
|
790
818
|
te = p
|
791
|
-
p = p - 1; begin emit_token.call(:
|
819
|
+
p = p - 1; begin emit_token.call(:INT) end
|
792
820
|
end
|
793
821
|
when 42 then
|
794
|
-
# line
|
822
|
+
# line 53 "lib/graphql/language/lexer.rl"
|
795
823
|
begin
|
796
824
|
te = p
|
797
|
-
p = p - 1; begin emit_token.call(:
|
825
|
+
p = p - 1; begin emit_token.call(:FLOAT) end
|
798
826
|
end
|
799
827
|
when 43 then
|
800
|
-
# line
|
828
|
+
# line 85 "lib/graphql/language/lexer.rl"
|
801
829
|
begin
|
802
830
|
te = p
|
803
|
-
p = p - 1; begin
|
831
|
+
p = p - 1; begin emit_token.call(:IDENTIFIER) end
|
804
832
|
end
|
805
833
|
when 44 then
|
806
|
-
# line
|
834
|
+
# line 92 "lib/graphql/language/lexer.rl"
|
807
835
|
begin
|
808
836
|
te = p
|
809
837
|
p = p - 1; begin meta[:col] += te - ts end
|
@@ -812,21 +840,27 @@ when 45 then
|
|
812
840
|
# line 93 "lib/graphql/language/lexer.rl"
|
813
841
|
begin
|
814
842
|
te = p
|
815
|
-
p = p - 1; begin
|
843
|
+
p = p - 1; begin meta[:col] += te - ts end
|
816
844
|
end
|
817
845
|
when 46 then
|
818
|
-
# line
|
846
|
+
# line 95 "lib/graphql/language/lexer.rl"
|
847
|
+
begin
|
848
|
+
te = p
|
849
|
+
p = p - 1; begin emit_token.call(:UNKNOWN_CHAR) end
|
850
|
+
end
|
851
|
+
when 47 then
|
852
|
+
# line 52 "lib/graphql/language/lexer.rl"
|
819
853
|
begin
|
820
854
|
begin p = ((te))-1; end
|
821
855
|
begin emit_token.call(:INT) end
|
822
856
|
end
|
823
|
-
when
|
824
|
-
# line
|
857
|
+
when 48 then
|
858
|
+
# line 95 "lib/graphql/language/lexer.rl"
|
825
859
|
begin
|
826
860
|
begin p = ((te))-1; end
|
827
861
|
begin emit_token.call(:UNKNOWN_CHAR) end
|
828
862
|
end
|
829
|
-
when
|
863
|
+
when 49 then
|
830
864
|
# line 1 "NONE"
|
831
865
|
begin
|
832
866
|
case act
|
@@ -884,18 +918,21 @@ when 48 then
|
|
884
918
|
when 18 then
|
885
919
|
begin begin p = ((te))-1; end
|
886
920
|
emit_token.call(:INPUT) end
|
887
|
-
when
|
921
|
+
when 19 then
|
922
|
+
begin begin p = ((te))-1; end
|
923
|
+
emit_token.call(:DIRECTIVE) end
|
924
|
+
when 27 then
|
888
925
|
begin begin p = ((te))-1; end
|
889
926
|
emit_string(ts + 1, te - 1, meta) end
|
890
|
-
when
|
927
|
+
when 34 then
|
891
928
|
begin begin p = ((te))-1; end
|
892
929
|
emit_token.call(:IDENTIFIER) end
|
893
|
-
when
|
930
|
+
when 38 then
|
894
931
|
begin begin p = ((te))-1; end
|
895
932
|
emit_token.call(:UNKNOWN_CHAR) end
|
896
933
|
end
|
897
934
|
end
|
898
|
-
# line
|
935
|
+
# line 936 "lib/graphql/language/lexer.rb"
|
899
936
|
end # action switch
|
900
937
|
end
|
901
938
|
end
|
@@ -915,7 +952,7 @@ when 0 then
|
|
915
952
|
# line 1 "NONE"
|
916
953
|
begin
|
917
954
|
ts = nil; end
|
918
|
-
# line
|
955
|
+
# line 956 "lib/graphql/language/lexer.rb"
|
919
956
|
end # to state action switch
|
920
957
|
end
|
921
958
|
if _trigger_goto
|
@@ -942,7 +979,7 @@ end
|
|
942
979
|
end
|
943
980
|
end
|
944
981
|
|
945
|
-
# line
|
982
|
+
# line 138 "lib/graphql/language/lexer.rl"
|
946
983
|
|
947
984
|
meta[:tokens]
|
948
985
|
end
|