rails-graphql 1.0.0.beta → 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gql_parser.c +1 -16
- data/ext/gql_parser.h +21 -0
- data/ext/shared.c +0 -5
- data/ext/shared.h +6 -6
- data/lib/generators/graphql/channel_generator.rb +27 -0
- data/lib/generators/graphql/controller_generator.rb +9 -4
- data/lib/generators/graphql/install_generator.rb +49 -0
- data/lib/generators/graphql/schema_generator.rb +9 -4
- data/lib/generators/graphql/templates/channel.erb +7 -0
- data/lib/generators/graphql/templates/config.rb +97 -0
- data/lib/generators/graphql/templates/controller.erb +2 -0
- data/lib/generators/graphql/templates/schema.erb +5 -3
- data/lib/gql_parser.so +0 -0
- data/lib/rails/graphql/alternative/field_set.rb +12 -0
- data/lib/rails/graphql/alternative/query.rb +9 -4
- data/lib/rails/graphql/alternative/subscription.rb +2 -1
- data/lib/rails/graphql/argument.rb +5 -3
- data/lib/rails/graphql/callback.rb +8 -7
- data/lib/rails/graphql/collectors/hash_collector.rb +12 -1
- data/lib/rails/graphql/collectors/json_collector.rb +21 -0
- data/lib/rails/graphql/config.rb +73 -57
- data/lib/rails/graphql/directive/include_directive.rb +0 -1
- data/lib/rails/graphql/directive/skip_directive.rb +0 -1
- data/lib/rails/graphql/directive/specified_by_directive.rb +24 -0
- data/lib/rails/graphql/directive.rb +30 -24
- data/lib/rails/graphql/event.rb +7 -6
- data/lib/rails/graphql/field/authorized_field.rb +0 -5
- data/lib/rails/graphql/field/input_field.rb +0 -5
- data/lib/rails/graphql/field/mutation_field.rb +5 -6
- data/lib/rails/graphql/field/output_field.rb +13 -2
- data/lib/rails/graphql/field/proxied_field.rb +5 -5
- data/lib/rails/graphql/field/resolved_field.rb +1 -1
- data/lib/rails/graphql/field/subscription_field.rb +35 -52
- data/lib/rails/graphql/field/typed_field.rb +26 -2
- data/lib/rails/graphql/field.rb +20 -19
- data/lib/rails/graphql/global_id.rb +5 -1
- data/lib/rails/graphql/helpers/inherited_collection/array.rb +1 -0
- data/lib/rails/graphql/helpers/inherited_collection/base.rb +2 -0
- data/lib/rails/graphql/helpers/inherited_collection/hash.rb +2 -1
- data/lib/rails/graphql/helpers/registerable.rb +1 -1
- data/lib/rails/graphql/helpers/with_arguments.rb +3 -2
- data/lib/rails/graphql/helpers/with_callbacks.rb +3 -3
- data/lib/rails/graphql/helpers/with_description.rb +10 -8
- data/lib/rails/graphql/helpers/with_directives.rb +5 -1
- data/lib/rails/graphql/helpers/with_events.rb +1 -0
- data/lib/rails/graphql/helpers/with_fields.rb +28 -22
- data/lib/rails/graphql/helpers/with_name.rb +3 -2
- data/lib/rails/graphql/helpers/with_schema_fields.rb +72 -48
- data/lib/rails/graphql/introspection.rb +1 -1
- data/lib/rails/graphql/railtie.rb +3 -2
- data/lib/rails/graphql/railties/app/base_channel.rb +10 -0
- data/lib/rails/graphql/railties/app/base_controller.rb +12 -0
- data/lib/rails/graphql/railties/app/views/_cable.js.erb +56 -0
- data/lib/rails/graphql/railties/app/views/_fetch.js.erb +20 -0
- data/lib/rails/graphql/railties/app/views/graphiql.html.erb +101 -0
- data/lib/rails/graphql/railties/base_generator.rb +3 -9
- data/lib/rails/graphql/railties/channel.rb +8 -8
- data/lib/rails/graphql/railties/controller.rb +45 -24
- data/lib/rails/graphql/request/arguments.rb +2 -1
- data/lib/rails/graphql/request/backtrace.rb +31 -10
- data/lib/rails/graphql/request/component/field.rb +15 -8
- data/lib/rails/graphql/request/component/fragment.rb +13 -7
- data/lib/rails/graphql/request/component/operation/subscription.rb +4 -6
- data/lib/rails/graphql/request/component/operation.rb +11 -4
- data/lib/rails/graphql/request/component/spread.rb +13 -4
- data/lib/rails/graphql/request/component/typename.rb +1 -1
- data/lib/rails/graphql/request/component.rb +2 -0
- data/lib/rails/graphql/request/context.rb +1 -1
- data/lib/rails/graphql/request/event.rb +6 -2
- data/lib/rails/graphql/request/helpers/directives.rb +1 -0
- data/lib/rails/graphql/request/helpers/selection_set.rb +10 -4
- data/lib/rails/graphql/request/helpers/value_writers.rb +8 -5
- data/lib/rails/graphql/request/prepared_data.rb +3 -1
- data/lib/rails/graphql/request/steps/organizable.rb +1 -1
- data/lib/rails/graphql/request/steps/preparable.rb +1 -1
- data/lib/rails/graphql/request/steps/resolvable.rb +1 -1
- data/lib/rails/graphql/request/strategy/sequenced_strategy.rb +3 -3
- data/lib/rails/graphql/request/strategy.rb +18 -4
- data/lib/rails/graphql/request/subscription.rb +18 -16
- data/lib/rails/graphql/request.rb +67 -37
- data/lib/rails/graphql/schema.rb +39 -86
- data/lib/rails/graphql/shortcuts.rb +11 -5
- data/lib/rails/graphql/source/active_record/builders.rb +20 -21
- data/lib/rails/graphql/source/active_record_source.rb +93 -33
- data/lib/rails/graphql/source/base.rb +11 -39
- data/lib/rails/graphql/source/builder.rb +9 -22
- data/lib/rails/graphql/source/scoped_arguments.rb +10 -4
- data/lib/rails/graphql/source.rb +23 -37
- data/lib/rails/graphql/subscription/provider/action_cable.rb +10 -9
- data/lib/rails/graphql/subscription/provider/base.rb +6 -5
- data/lib/rails/graphql/subscription/store/base.rb +5 -9
- data/lib/rails/graphql/subscription/store/memory.rb +18 -9
- data/lib/rails/graphql/type/creator.rb +196 -0
- data/lib/rails/graphql/type/enum.rb +17 -9
- data/lib/rails/graphql/type/input.rb +20 -4
- data/lib/rails/graphql/type/interface.rb +15 -4
- data/lib/rails/graphql/type/object/directive_object.rb +6 -5
- data/lib/rails/graphql/type/object/input_value_object.rb +3 -4
- data/lib/rails/graphql/type/object/type_object.rb +40 -13
- data/lib/rails/graphql/type/object.rb +10 -5
- data/lib/rails/graphql/type/scalar/binary_scalar.rb +2 -0
- data/lib/rails/graphql/type/scalar/date_scalar.rb +2 -0
- data/lib/rails/graphql/type/scalar/date_time_scalar.rb +2 -0
- data/lib/rails/graphql/type/scalar/decimal_scalar.rb +2 -0
- data/lib/rails/graphql/type/scalar/json_scalar.rb +3 -1
- data/lib/rails/graphql/type/scalar/time_scalar.rb +3 -1
- data/lib/rails/graphql/type/scalar.rb +1 -1
- data/lib/rails/graphql/type/union.rb +7 -2
- data/lib/rails/graphql/type.rb +10 -2
- data/lib/rails/graphql/type_map.rb +18 -7
- data/lib/rails/graphql/uri.rb +5 -4
- data/lib/rails/graphql/version.rb +6 -2
- data/lib/rails/graphql.rb +9 -7
- data/test/assets/introspection-mem.txt +1 -1
- data/test/assets/introspection.gql +2 -0
- data/test/assets/mem.gql +74 -60
- data/test/assets/mysql.gql +69 -55
- data/test/assets/sqlite.gql +78 -64
- data/test/assets/translate.gql +50 -39
- data/test/config.rb +2 -1
- data/test/graphql/schema_test.rb +2 -31
- data/test/graphql/source_test.rb +0 -10
- data/test/graphql/type/interface_test.rb +8 -5
- data/test/graphql/type/object_test.rb +8 -2
- data/test/graphql/type_map_test.rb +13 -16
- data/test/integration/global_id_test.rb +4 -4
- data/test/integration/memory/star_wars_validation_test.rb +2 -2
- data/test/integration/mysql/star_wars_introspection_test.rb +1 -1
- data/test/integration/resolver_precedence_test.rb +1 -1
- data/test/integration/schemas/memory.rb +3 -4
- data/test/integration/sqlite/star_wars_global_id_test.rb +27 -21
- data/test/integration/sqlite/star_wars_introspection_test.rb +1 -1
- data/test/integration/translate_test.rb +26 -14
- metadata +20 -7
@@ -79,21 +79,19 @@ class GraphQL_TypeMapTest < GraphQL::TestCase
|
|
79
79
|
|
80
80
|
def test_fetch
|
81
81
|
stub_dig do
|
82
|
-
|
83
|
-
|
84
|
-
assert_nil(subject.fetch(:number, base_class: :Other))
|
82
|
+
assert_nil(subject.fetch(:number))
|
83
|
+
assert_nil(subject.fetch(:number, base_class: :Other))
|
85
84
|
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
assert_equal(1, subject.fetch(:string))
|
86
|
+
assert_equal(1, subject.fetch(:string, prevent_register: true))
|
87
|
+
assert_equal(1, subject.fetch(:number, fallback: :string))
|
89
88
|
|
90
|
-
|
91
|
-
|
89
|
+
assert_equal(2, subject.fetch(:string, namespaces: :other))
|
90
|
+
assert_equal(3, subject.fetch(:number, namespaces: Set[:other]))
|
92
91
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
end
|
92
|
+
assert_equal(4, subject.fetch(:boolean))
|
93
|
+
assert_equal(4, subject.fetch(:boolean, namespaces: :other))
|
94
|
+
assert_nil(subject.fetch(:boolean, namespaces: :other, exclusive: true))
|
97
95
|
end
|
98
96
|
end
|
99
97
|
|
@@ -145,9 +143,8 @@ class GraphQL_TypeMapTest < GraphQL::TestCase
|
|
145
143
|
assert_equal([:base, object1, :string], added[0][0..-2])
|
146
144
|
assert_equal([:base, object1, 'string'], added[1][0..-2])
|
147
145
|
|
148
|
-
subject.stub(:
|
149
|
-
|
150
|
-
assert_equal([:string, xargs], added[1][-1].call)
|
146
|
+
subject.stub(:dig, passallthrough) do
|
147
|
+
assert_equal([:base, object1, :string], added[1][-1].call)
|
151
148
|
assert_equal(object1, added[0][-1])
|
152
149
|
end
|
153
150
|
|
@@ -261,7 +258,7 @@ class GraphQL_TypeMapTest < GraphQL::TestCase
|
|
261
258
|
@base_classes=3
|
262
259
|
@objects=0
|
263
260
|
@pending=0
|
264
|
-
@dependencies={base:
|
261
|
+
@dependencies={base: 15}>
|
265
262
|
INFO
|
266
263
|
end
|
267
264
|
|
@@ -35,8 +35,8 @@ class Integration_GlobalIDTest < GraphQL::IntegrationTestCase
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def test_create_object_field
|
38
|
-
obj =
|
39
|
-
assert_gid_value('gql://start-wars-mem/
|
38
|
+
obj = SCHEMA::NestedTypes::HumanObject[:name]
|
39
|
+
assert_gid_value('gql://start-wars-mem/Human/name', obj)
|
40
40
|
end
|
41
41
|
|
42
42
|
def test_create_scalar_type
|
@@ -84,8 +84,8 @@ class Integration_GlobalIDTest < GraphQL::IntegrationTestCase
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def test_parse_object_field
|
87
|
-
obj = find_gid('gql://start-wars-mem/
|
88
|
-
assert_equal(
|
87
|
+
obj = find_gid('gql://start-wars-mem/Human/name')
|
88
|
+
assert_equal(SCHEMA::NestedTypes::HumanObject[:name], obj)
|
89
89
|
end
|
90
90
|
|
91
91
|
def test_parse_scalar_type
|
@@ -34,7 +34,7 @@ class Integration_Memory_StarWarsValidationTest < GraphQL::IntegrationTestCase
|
|
34
34
|
|
35
35
|
def test_nonexistent_fields
|
36
36
|
errors = [{
|
37
|
-
message: 'Unable to find a field named "favoriteSpaceship" on
|
37
|
+
message: 'Unable to find a field named "favoriteSpaceship" on Character.',
|
38
38
|
locations: [{ line: 1, column: 35 }, { line: 1, column: 52 }],
|
39
39
|
path: %w[HeroSpaceshipQuery hero favoriteSpaceship],
|
40
40
|
extensions: { stage: 'organize', exception: 'Rails::GraphQL::MissingFieldError' },
|
@@ -73,7 +73,7 @@ class Integration_Memory_StarWarsValidationTest < GraphQL::IntegrationTestCase
|
|
73
73
|
|
74
74
|
def test_specific_fields_on_interfaces
|
75
75
|
errors = [{
|
76
|
-
message: 'Unable to find a field named "primaryFunction" on
|
76
|
+
message: 'Unable to find a field named "primaryFunction" on Character.',
|
77
77
|
locations: [{ line: 1, column: 40 }, { line: 1, column: 55 }],
|
78
78
|
path: %w[HeroSpaceshipQuery hero primaryFunction],
|
79
79
|
extensions: { stage: 'organize', exception: 'Rails::GraphQL::MissingFieldError' },
|
@@ -11,7 +11,7 @@ class Integration_MySQL_StarWarsIntrospectionTest < GraphQL::IntegrationTestCase
|
|
11
11
|
assert(SCHEMA.has_field?(:query, :__type))
|
12
12
|
end
|
13
13
|
|
14
|
-
# Test this spec with all
|
14
|
+
# Test this spec with all available scalars
|
15
15
|
def remove_keys_form_type_map
|
16
16
|
end
|
17
17
|
|
@@ -97,7 +97,7 @@ class Integration_ResolverPrecedenceTest < GraphQL::IntegrationTestCase
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def test_simple_object
|
100
|
-
object =
|
100
|
+
object = SCHEMA::NestedTypes::Object1Object
|
101
101
|
field = object[:field1]
|
102
102
|
|
103
103
|
# (1) Block has higher precedence than default value
|
@@ -102,7 +102,6 @@ class StartWarsMemSchema < GraphQL::Schema
|
|
102
102
|
|
103
103
|
rescue_from('StandardError') do |exception|
|
104
104
|
raise unless exception.source.is_a?(Rails::GraphQL::Request::Component::Field)
|
105
|
-
exception.request.exception_to_error(exception, exception.source)
|
106
105
|
end
|
107
106
|
|
108
107
|
enum 'Episode' do
|
@@ -116,10 +115,10 @@ class StartWarsMemSchema < GraphQL::Schema
|
|
116
115
|
interface 'Character' do
|
117
116
|
desc 'A character in the Star Wars Trilogy'
|
118
117
|
|
119
|
-
field :id,
|
118
|
+
field :id, null: false,
|
120
119
|
desc: 'The id of the character'
|
121
120
|
|
122
|
-
field :name,
|
121
|
+
field :name,
|
123
122
|
desc: 'The name of the character'
|
124
123
|
|
125
124
|
field :friends, 'Character', array: true,
|
@@ -128,7 +127,7 @@ class StartWarsMemSchema < GraphQL::Schema
|
|
128
127
|
field :appears_in, 'Episode', array: true,
|
129
128
|
desc: 'Which movies they appear in'
|
130
129
|
|
131
|
-
field :secret_backstory,
|
130
|
+
field :secret_backstory,
|
132
131
|
desc: 'All secrets about their past'
|
133
132
|
end
|
134
133
|
|
@@ -8,34 +8,34 @@ class Integration_SQLite_StarWarsGlobalIDTest < GraphQL::IntegrationTestCase
|
|
8
8
|
## CREATE
|
9
9
|
|
10
10
|
def test_create_query_field
|
11
|
-
obj =
|
12
|
-
assert_gid_value('gql://star-wars-sqlite/
|
11
|
+
obj = source[:query][:lite_factions]
|
12
|
+
assert_gid_value('gql://star-wars-sqlite/Schema/query/liteFactions', obj)
|
13
13
|
end
|
14
14
|
|
15
15
|
def test_create_object
|
16
|
-
obj =
|
16
|
+
obj = source.object
|
17
17
|
assert_gid_value('gql://star-wars-sqlite/Type/LiteFaction', obj)
|
18
18
|
end
|
19
19
|
|
20
20
|
def test_create_input
|
21
|
-
obj =
|
21
|
+
obj = source.input
|
22
22
|
assert_gid_value('gql://star-wars-sqlite/Type/LiteFactionInput', obj)
|
23
23
|
|
24
|
-
obj =
|
24
|
+
obj = source.input.deserialize(nil)
|
25
25
|
assert_gid_value('gql://star-wars-sqlite/Type/LiteFactionInput?', obj)
|
26
26
|
|
27
27
|
params = { name: 'Sample' }
|
28
|
-
obj =
|
28
|
+
obj = source.input.deserialize(params)
|
29
29
|
assert_gid_value('gql://star-wars-sqlite/Type/LiteFactionInput?name=Sample', obj)
|
30
30
|
|
31
31
|
params = { name: 'Sample', bases_attributes: [{ name: 'Other' }] }
|
32
|
-
obj =
|
32
|
+
obj = source.input.deserialize(params)
|
33
33
|
assert_gid_value('gql://star-wars-sqlite/Type/LiteFactionInput?basesAttributes[][name]=Other&name=Sample', obj)
|
34
34
|
end
|
35
35
|
|
36
36
|
def test_create_object_field
|
37
|
-
obj =
|
38
|
-
assert_gid_value('gql://star-wars-sqlite/
|
37
|
+
obj = source.object[:name]
|
38
|
+
assert_gid_value('gql://star-wars-sqlite/LiteFaction/name', obj)
|
39
39
|
end
|
40
40
|
|
41
41
|
def assert_gid_value(result, object)
|
@@ -45,39 +45,45 @@ class Integration_SQLite_StarWarsGlobalIDTest < GraphQL::IntegrationTestCase
|
|
45
45
|
## PARSE
|
46
46
|
|
47
47
|
def test_parse_query_field
|
48
|
-
obj = find_gid('gql://star-wars-sqlite/
|
49
|
-
assert_equal(
|
48
|
+
obj = find_gid('gql://star-wars-sqlite/Schema/query/liteFactions')
|
49
|
+
assert_equal(source[:query][:lite_factions], obj.proxied_field)
|
50
50
|
end
|
51
51
|
|
52
52
|
def test_parse_object
|
53
53
|
obj = find_gid('gql://star-wars-sqlite/Type/LiteFaction')
|
54
|
-
assert_equal(
|
54
|
+
assert_equal(source.object, obj)
|
55
55
|
end
|
56
56
|
|
57
57
|
def test_parse_input
|
58
58
|
obj = find_gid('gql://star-wars-sqlite/Type/LiteFactionInput')
|
59
|
-
assert_equal(
|
59
|
+
assert_equal(source.input, obj)
|
60
60
|
|
61
61
|
obj = find_gid('gql://star-wars-sqlite/Type/LiteFactionInput?')
|
62
|
-
assert_instance_of(
|
62
|
+
assert_instance_of(source.input, obj)
|
63
63
|
assert_empty(obj.params)
|
64
64
|
|
65
65
|
obj = find_gid('gql://star-wars-sqlite/Type/LiteFactionInput?name=Sample')
|
66
|
-
assert_instance_of(
|
66
|
+
assert_instance_of(source.input, obj)
|
67
67
|
assert_equal('Sample', obj.params[:name])
|
68
68
|
|
69
69
|
obj = find_gid('gql://star-wars-sqlite/Type/LiteFactionInput?bases_attributes[][name]=Other&name=Sample')
|
70
|
-
assert_instance_of(
|
70
|
+
assert_instance_of(source.input, obj)
|
71
71
|
assert_equal([{name: 'Other'}], obj.params[:bases_attributes])
|
72
72
|
assert_equal('Sample', obj.params[:name])
|
73
73
|
end
|
74
74
|
|
75
75
|
def test_parse_object_field
|
76
|
-
obj = find_gid('gql://star-wars-sqlite/
|
77
|
-
assert_equal(
|
76
|
+
obj = find_gid('gql://star-wars-sqlite/LiteFaction/name')
|
77
|
+
assert_equal(source.object[:name], obj)
|
78
78
|
end
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
80
|
+
protected
|
81
|
+
|
82
|
+
def find_gid(gid)
|
83
|
+
GraphQL::GlobalID.find(gid)
|
84
|
+
end
|
85
|
+
|
86
|
+
def source
|
87
|
+
StartWarsSqliteSchema::NestedTypes::LiteFactionSource
|
88
|
+
end
|
83
89
|
end
|
@@ -11,7 +11,7 @@ class Integration_SQLite_StarWarsIntrospectionTest < GraphQL::IntegrationTestCas
|
|
11
11
|
assert(SCHEMA.has_field?(:query, :__type))
|
12
12
|
end
|
13
13
|
|
14
|
-
# Test this spec with all
|
14
|
+
# Test this spec with all available scalars
|
15
15
|
def remove_keys_form_type_map
|
16
16
|
end
|
17
17
|
|
@@ -27,35 +27,47 @@ class Translate_test < GraphQL::IntegrationTestCase
|
|
27
27
|
scalar :scalar_desc
|
28
28
|
end
|
29
29
|
|
30
|
+
def setup
|
31
|
+
$config.enable_i18n_descriptions = true
|
32
|
+
end
|
33
|
+
|
34
|
+
def teardown
|
35
|
+
$config.enable_i18n_descriptions = false
|
36
|
+
end
|
37
|
+
|
30
38
|
def test_simple_translate
|
31
|
-
|
32
|
-
assert_equal('
|
33
|
-
assert_equal('
|
34
|
-
assert_equal('
|
35
|
-
assert_equal('
|
36
|
-
assert_equal('
|
37
|
-
assert_equal('
|
39
|
+
skip 'Fix for new I18n structure'
|
40
|
+
assert_equal('Field', SCHEMA[:query][:sample_field].description)
|
41
|
+
assert_equal('Enum', GraphQL::EnumDescEnum.description)
|
42
|
+
assert_equal('Interface', GraphQL::InterfaceDescInterface.description)
|
43
|
+
assert_equal('Object', GraphQL::ObjectDescObject.description)
|
44
|
+
assert_equal('Union', GraphQL::UnionDescUnion.description)
|
45
|
+
assert_equal('Input', GraphQL::InputDescInput.description)
|
46
|
+
assert_equal('Scalar', GraphQL::ScalarDescScalar.description)
|
38
47
|
end
|
39
48
|
|
40
49
|
def test_all_levels_translate_fields
|
41
|
-
|
42
|
-
assert_equal('
|
43
|
-
assert_equal('
|
44
|
-
assert_equal('
|
45
|
-
assert_equal('
|
46
|
-
assert_equal('
|
50
|
+
skip 'Fix for new I18n structure'
|
51
|
+
assert_equal('A', SCHEMA[:query][:sample_a].description)
|
52
|
+
assert_equal('B', SCHEMA[:query][:sample_b].description)
|
53
|
+
assert_equal('C', SCHEMA[:query][:sample_c].description)
|
54
|
+
assert_equal('D', SCHEMA[:query][:sample_d].description)
|
55
|
+
assert_equal('E', SCHEMA[:query][:sample_e].description)
|
56
|
+
assert_equal('F', SCHEMA[:query][:sample_f].description)
|
47
57
|
end
|
48
58
|
|
49
59
|
def test_request_translate
|
60
|
+
skip 'Fix for new I18n structure'
|
50
61
|
result = { data: { __type: { name: 'InterfaceDesc', description: 'Interface' } } }
|
51
62
|
assert_result(result, '{ __type(name: "InterfaceDesc") { name description } }')
|
52
63
|
end
|
53
64
|
|
54
65
|
def test_gql_introspection
|
66
|
+
skip 'Fix for new I18n structure'
|
55
67
|
result = SCHEMA.to_gql
|
56
68
|
expected = gql_file('translate').split('').sort.join.squish
|
57
69
|
|
58
|
-
File.write('test/assets/translate.gql', result)
|
70
|
+
# File.write('test/assets/translate.gql', result)
|
59
71
|
assert_equal(expected, result.split('').sort.join.squish)
|
60
72
|
end
|
61
73
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '6.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: benchmark-ips
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,8 +164,8 @@ dependencies:
|
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '1.4'
|
167
|
-
description: A GraphQL server
|
168
|
-
|
167
|
+
description: A Fresh new GraphQL server for Rails applications, with a focus on natural
|
168
|
+
and Ruby-like DSL
|
169
169
|
email:
|
170
170
|
- me@carlosfsilva.com
|
171
171
|
executables: []
|
@@ -180,10 +180,15 @@ files:
|
|
180
180
|
- ext/extconf.h
|
181
181
|
- ext/extconf.rb
|
182
182
|
- ext/gql_parser.c
|
183
|
+
- ext/gql_parser.h
|
183
184
|
- ext/shared.c
|
184
185
|
- ext/shared.h
|
186
|
+
- lib/generators/graphql/channel_generator.rb
|
185
187
|
- lib/generators/graphql/controller_generator.rb
|
188
|
+
- lib/generators/graphql/install_generator.rb
|
186
189
|
- lib/generators/graphql/schema_generator.rb
|
190
|
+
- lib/generators/graphql/templates/channel.erb
|
191
|
+
- lib/generators/graphql/templates/config.rb
|
187
192
|
- lib/generators/graphql/templates/controller.erb
|
188
193
|
- lib/generators/graphql/templates/schema.erb
|
189
194
|
- lib/gql_parser.so
|
@@ -210,6 +215,7 @@ files:
|
|
210
215
|
- lib/rails/graphql/directive/deprecated_directive.rb
|
211
216
|
- lib/rails/graphql/directive/include_directive.rb
|
212
217
|
- lib/rails/graphql/directive/skip_directive.rb
|
218
|
+
- lib/rails/graphql/directive/specified_by_directive.rb
|
213
219
|
- lib/rails/graphql/errors.rb
|
214
220
|
- lib/rails/graphql/event.rb
|
215
221
|
- lib/rails/graphql/field.rb
|
@@ -248,6 +254,11 @@ files:
|
|
248
254
|
- lib/rails/graphql/helpers/with_validator.rb
|
249
255
|
- lib/rails/graphql/introspection.rb
|
250
256
|
- lib/rails/graphql/railtie.rb
|
257
|
+
- lib/rails/graphql/railties/app/base_channel.rb
|
258
|
+
- lib/rails/graphql/railties/app/base_controller.rb
|
259
|
+
- lib/rails/graphql/railties/app/views/_cable.js.erb
|
260
|
+
- lib/rails/graphql/railties/app/views/_fetch.js.erb
|
261
|
+
- lib/rails/graphql/railties/app/views/graphiql.html.erb
|
251
262
|
- lib/rails/graphql/railties/base_generator.rb
|
252
263
|
- lib/rails/graphql/railties/channel.rb
|
253
264
|
- lib/rails/graphql/railties/controller.rb
|
@@ -297,6 +308,7 @@ files:
|
|
297
308
|
- lib/rails/graphql/subscription/store/memory.rb
|
298
309
|
- lib/rails/graphql/to_gql.rb
|
299
310
|
- lib/rails/graphql/type.rb
|
311
|
+
- lib/rails/graphql/type/creator.rb
|
300
312
|
- lib/rails/graphql/type/enum.rb
|
301
313
|
- lib/rails/graphql/type/enum/directive_location_enum.rb
|
302
314
|
- lib/rails/graphql/type/enum/type_kind_enum.rb
|
@@ -388,6 +400,7 @@ metadata:
|
|
388
400
|
homepage_uri: https://www.rails-graphql.dev/
|
389
401
|
source_code_uri: https://github.com/virtualshield/rails-graphql
|
390
402
|
bug_tracker_uri: https://github.com/virtualshield/rails-graphql/issues
|
403
|
+
changelog_uri: https://github.com/virtualshield/rails-graphql/blob/master/CHANGELOG.md
|
391
404
|
post_install_message:
|
392
405
|
rdoc_options:
|
393
406
|
- "--title"
|
@@ -408,7 +421,7 @@ requirements: []
|
|
408
421
|
rubygems_version: 3.2.33
|
409
422
|
signing_key:
|
410
423
|
specification_version: 4
|
411
|
-
summary:
|
424
|
+
summary: GraphQL meets RoR with the most Ruby-like DSL
|
412
425
|
test_files:
|
413
426
|
- test/assets/en.yml
|
414
427
|
- test/assets/introspection-db.json
|