graphql 1.8.9 → 1.8.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4378912bdbb59ceaa6006848e6eda269f1185df1
4
- data.tar.gz: 5dd1788b97f608a67ffa5c27f6848a575f996daa
3
+ metadata.gz: 99f3a96dc307582a93f6994a7c1cef9e714dc8c8
4
+ data.tar.gz: d6cfd49868435ca6c6ace15541d2530f353bc2a4
5
5
  SHA512:
6
- metadata.gz: 3f9e4c341f98a13ad1018c0ae9b5c1f1063f5c5cbf8485b29c164f485f79257b8dc148db9fb959fdad9e8aa9f3d4eb05648a27b9a2168387ca3649b994f200ab
7
- data.tar.gz: e5cbe104fb2f6d06f4fdf0cf51f931367845f933440e8143897207af1bfb7302c6ae7fca0d823cc3b593bb5f83545c3c030a00c6c5a9d008b9f545a1666a52dd
6
+ metadata.gz: be7eb93ad856e8cb07fc7fbc0c5151cdad9b1afea0d22953fc2e017db126a3df9a9958b71ca96c71cabec8c9a322b6a2d37fc256604ab739e63e982a81f1757b
7
+ data.tar.gz: 9f2ecb1adab0c9e4c0c53c4ae55e3b55e1e216d5217927bd874f7e2c550939ba3a80413cbfee8c6c92f28cac889ed96e9f782aa3dfa6df23aa8fd89a50959eb2
@@ -17,6 +17,7 @@ module Graphql
17
17
  # - base_input_object.rb
18
18
  # - base_interface.rb
19
19
  # - base_object.rb
20
+ # - base_scalar.rb
20
21
  # - base_union.rb
21
22
  # - query_type.rb
22
23
  # - loaders/
@@ -92,7 +93,7 @@ module Graphql
92
93
  create_dir("#{options[:directory]}/types")
93
94
  template("schema.erb", schema_file_path)
94
95
 
95
- ["base_object", "base_enum", "base_input_object", "base_interface", "base_union"].each do |base_type|
96
+ ["base_object", "base_enum", "base_input_object", "base_interface", "base_scalar", "base_union"].each do |base_type|
96
97
  template("#{base_type}.erb", "#{options[:directory]}/types/#{base_type}.rb")
97
98
  end
98
99
 
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+ require 'generators/graphql/type_generator'
3
+
4
+ module Graphql
5
+ module Generators
6
+ # Generate a scalar type by given name.
7
+ #
8
+ # ```
9
+ # rails g graphql:scalar Date
10
+ # ```
11
+ class ScalarGenerator < TypeGeneratorBase
12
+ desc "Create a GraphQL::ScalarType with the given name"
13
+ source_root File.expand_path('../templates', __FILE__)
14
+
15
+ def create_type_file
16
+ template "scalar.erb", "#{options[:directory]}/types/#{type_file_name}.rb"
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,4 @@
1
+ module Types
2
+ class BaseScalar < GraphQL::Schema::Scalar
3
+ end
4
+ end
@@ -0,0 +1,13 @@
1
+ module Types
2
+ class <%= type_ruby_name.split('::')[-1] %> < Types::BaseScalar
3
+ def self.coerce_input(input_value, context)
4
+ # Override this to prepare a client-provided GraphQL value for your Ruby code
5
+ input_value
6
+ end
7
+
8
+ def self.coerce_result(ruby_value, context)
9
+ # Override this to serialize a Ruby value for the GraphQL response
10
+ ruby_value.to_s
11
+ end
12
+ end
13
+ end
@@ -154,7 +154,7 @@ module GraphQL
154
154
  # @api private
155
155
  attr_writer :value
156
156
 
157
- def_delegators :@provided_values, :[], :[]=, :to_h, :key?, :fetch
157
+ def_delegators :@provided_values, :[], :[]=, :to_h, :key?, :fetch, :dig
158
158
  def_delegators :@query, :trace
159
159
 
160
160
  # @!method [](key)
@@ -220,7 +220,7 @@ module GraphQL
220
220
  end
221
221
 
222
222
  def_delegators :@context,
223
- :[], :[]=, :key?, :fetch, :to_h, :namespace,
223
+ :[], :[]=, :key?, :fetch, :to_h, :namespace, :dig,
224
224
  :spawn, :warden, :errors,
225
225
  :execution_strategy, :strategy
226
226
 
@@ -70,6 +70,8 @@ module GraphQL
70
70
 
71
71
  def decode(data)
72
72
  @encoder.decode(data, nonce: true)
73
+ rescue ArgumentError
74
+ raise GraphQL::ExecutionError, "Invalid cursor: #{data.inspect}"
73
75
  end
74
76
 
75
77
  # The value passed as `first:`, if there was one. Negative numbers become `0`.
@@ -406,9 +406,11 @@ module GraphQL
406
406
  end
407
407
  end
408
408
 
409
+ CONTEXT_EXTRAS = [:path]
410
+
409
411
  # @param ctx [GraphQL::Query::Context::FieldResolutionContext]
410
412
  def fetch_extra(extra_name, ctx)
411
- if respond_to?(extra_name)
413
+ if !CONTEXT_EXTRAS.include?(extra_name) && respond_to?(extra_name)
412
414
  self.public_send(extra_name)
413
415
  elsif ctx.respond_to?(extra_name)
414
416
  ctx.public_send(extra_name)
@@ -139,10 +139,14 @@ module GraphQL
139
139
  args.each do |key, value|
140
140
  arg_defn = @arguments_by_keyword[key]
141
141
  if arg_defn
142
- prepped_value = prepared_args[key] = load_argument(key, value)
143
- if context.schema.lazy?(prepped_value)
144
- prepare_lazies << context.schema.after_lazy(prepped_value) do |finished_prepped_value|
145
- prepared_args[key] = finished_prepped_value
142
+ if value.nil?
143
+ prepared_args[key] = value
144
+ else
145
+ prepped_value = prepared_args[key] = load_argument(key, value)
146
+ if context.schema.lazy?(prepped_value)
147
+ prepare_lazies << context.schema.after_lazy(prepped_value) do |finished_prepped_value|
148
+ prepared_args[key] = finished_prepped_value
149
+ end
146
150
  end
147
151
  end
148
152
  else
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "1.8.9"
3
+ VERSION = "1.8.10"
4
4
  end
@@ -217,6 +217,24 @@ TABLE
217
217
  end
218
218
  end
219
219
 
220
+ describe "read values" do
221
+ let(:context) { GraphQL::Query::Context.new(query: OpenStruct.new(schema: schema), values: {a: {b: 1}}, object: nil) }
222
+
223
+ it "allows you to read values of contexts using []" do
224
+ assert_equal({b: 1}, context[:a])
225
+ end
226
+
227
+ it "allows you to read values of contexts using dig" do
228
+ if RUBY_VERSION >= '2.3.0'
229
+ assert_equal(1, context.dig(:a, :b))
230
+ else
231
+ assert_raises NoMethodError do
232
+ context.dig(:a, :b)
233
+ end
234
+ end
235
+ end
236
+ end
237
+
220
238
  describe "accessing context after the fact" do
221
239
  let(:query_string) { %|
222
240
  { pushContext }
@@ -56,6 +56,15 @@ describe GraphQL::Schema::Resolver do
56
56
  end
57
57
  end
58
58
 
59
+ class ResolverWithPath < BaseResolver
60
+ type String, null: false
61
+
62
+ extras [:path]
63
+ def resolve(path:)
64
+ path.inspect
65
+ end
66
+ end
67
+
59
68
  class Resolver5 < Resolver4
60
69
  end
61
70
 
@@ -271,6 +280,36 @@ describe GraphQL::Schema::Resolver do
271
280
  end
272
281
  end
273
282
 
283
+ class MutationWithNullableLoadsArgument < GraphQL::Schema::Mutation
284
+ argument :label_id, ID, required: false, loads: HasValue
285
+ argument :label_ids, [ID], required: false, loads: HasValue
286
+
287
+ field :inputs, String, null: false
288
+
289
+ def resolve(**inputs)
290
+ {
291
+ inputs: JSON.dump(inputs)
292
+ }
293
+ end
294
+ end
295
+
296
+ class MutationWithRequiredLoadsArgument < GraphQL::Schema::Mutation
297
+ argument :label_id, ID, required: true, loads: HasValue
298
+
299
+ field :inputs, String, null: false
300
+
301
+ def resolve(**inputs)
302
+ {
303
+ inputs: JSON.dump(inputs)
304
+ }
305
+ end
306
+ end
307
+
308
+ class Mutation < GraphQL::Schema::Object
309
+ field :mutation_with_nullable_loads_argument, mutation: MutationWithNullableLoadsArgument
310
+ field :mutation_with_required_loads_argument, mutation: MutationWithRequiredLoadsArgument
311
+ end
312
+
274
313
  class Query < GraphQL::Schema::Object
275
314
  class CustomField < GraphQL::Schema::Field
276
315
  def resolve_field(*args)
@@ -293,6 +332,7 @@ describe GraphQL::Schema::Resolver do
293
332
  field :resolver_6, resolver: Resolver6
294
333
  field :resolver_7, resolver: Resolver7
295
334
  field :resolver_8, resolver: Resolver8
335
+ field :resolver_with_path, resolver: ResolverWithPath
296
336
 
297
337
  field :prep_resolver_1, resolver: PrepResolver1
298
338
  field :prep_resolver_2, resolver: PrepResolver2
@@ -312,8 +352,17 @@ describe GraphQL::Schema::Resolver do
312
352
 
313
353
  class Schema < GraphQL::Schema
314
354
  query(Query)
355
+ mutation(Mutation)
315
356
  lazy_resolve LazyBlock, :value
316
357
  orphan_types IntegerWrapper
358
+
359
+ def object_from_id(id, ctx)
360
+ if id == "invalid"
361
+ nil
362
+ else
363
+ 1
364
+ end
365
+ end
317
366
  end
318
367
  end
319
368
 
@@ -366,6 +415,11 @@ describe GraphQL::Schema::Resolver do
366
415
  res = exec_query " { resolver4 } ", root_value: OpenStruct.new(value: 0)
367
416
  assert_equal 9, res["data"]["resolver4"]
368
417
  end
418
+
419
+ it "gets path from extras" do
420
+ res = exec_query " { resolverWithPath } ", root_value: OpenStruct.new(value: 0)
421
+ assert_equal '["resolverWithPath"]', res["data"]["resolverWithPath"]
422
+ end
369
423
  end
370
424
 
371
425
  describe "extras" do
@@ -535,6 +589,41 @@ describe GraphQL::Schema::Resolver do
535
589
  # (100 + 8) * 3
536
590
  assert_equal [27, 54, 324], res["data"]["prepResolver9Array"].map { |v| v["value"] }
537
591
  end
592
+
593
+ it "preserves `nil` when nullable argument is provided `null`" do
594
+ res = exec_query("mutation { mutationWithNullableLoadsArgument(labelId: null) { inputs } }")
595
+
596
+ assert_equal nil, res["errors"]
597
+ assert_equal '{"label":null}', res["data"]["mutationWithNullableLoadsArgument"]["inputs"]
598
+ end
599
+
600
+ it "preserves `nil` when nullable list argument is provided `null`" do
601
+ res = exec_query("mutation { mutationWithNullableLoadsArgument(labelIds: null) { inputs } }")
602
+
603
+ assert_equal nil, res["errors"]
604
+ assert_equal '{"labels":null}', res["data"]["mutationWithNullableLoadsArgument"]["inputs"]
605
+ end
606
+
607
+ it "omits omitted nullable argument" do
608
+ res = exec_query("mutation { mutationWithNullableLoadsArgument { inputs } }")
609
+
610
+ assert_equal nil, res["errors"]
611
+ assert_equal "{}", res["data"]["mutationWithNullableLoadsArgument"]["inputs"]
612
+ end
613
+
614
+ it "returns an error when nullable argument is provided an invalid value" do
615
+ res = exec_query('mutation { mutationWithNullableLoadsArgument(labelId: "invalid") { inputs } }')
616
+
617
+ assert res["errors"]
618
+ assert_equal 'No object found for `labelId: "invalid"`', res["errors"][0]["message"]
619
+ end
620
+
621
+ it "returns an error when a non-nullable argument is provided an invalid value" do
622
+ res = exec_query('mutation { mutationWithRequiredLoadsArgument(labelId: "invalid") { inputs } }')
623
+
624
+ assert res["errors"]
625
+ assert_equal 'No object found for `labelId: "invalid"`', res["errors"][0]["message"]
626
+ end
538
627
  end
539
628
  end
540
629
  end
@@ -19,7 +19,7 @@ class GraphQLGeneratorsInstallGeneratorTest < Rails::Generators::TestCase
19
19
 
20
20
  assert_file "app/graphql/types/.keep"
21
21
  assert_file "app/graphql/mutations/.keep"
22
- ["base_object", "base_input_object", "base_enum", "base_union", "base_interface"].each do |base_type|
22
+ ["base_object", "base_input_object", "base_enum", "base_scalar", "base_union", "base_interface"].each do |base_type|
23
23
  assert_file "app/graphql/types/#{base_type}.rb"
24
24
  end
25
25
  expected_query_route = %|post "/graphql", to: "graphql#execute"|
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+ require "spec_helper"
3
+ require "generators/graphql/scalar_generator"
4
+
5
+ class GraphQLGeneratorsScalarGeneratorTest < BaseGeneratorTest
6
+ tests Graphql::Generators::ScalarGenerator
7
+
8
+ test "it generates scalar class" do
9
+ expected_content = <<-RUBY
10
+ module Types
11
+ class DateType < Types::BaseScalar
12
+ def self.coerce_input(input_value, context)
13
+ # Override this to prepare a client-provided GraphQL value for your Ruby code
14
+ input_value
15
+ end
16
+
17
+ def self.coerce_result(ruby_value, context)
18
+ # Override this to serialize a Ruby value for the GraphQL response
19
+ ruby_value.to_s
20
+ end
21
+ end
22
+ end
23
+ RUBY
24
+
25
+ run_generator(["Date"])
26
+ assert_file "app/graphql/types/date_type.rb", expected_content
27
+ end
28
+ end
@@ -89,5 +89,13 @@ describe GraphQL::Relay::BaseConnection do
89
89
 
90
90
  assert_equal "Person/1", conn.decode("UGVyc29uLzE")
91
91
  end
92
+
93
+ it "raises an execution error when an invalid cursor is given" do
94
+ conn = GraphQL::Relay::BaseConnection.new([], {}, context: nil)
95
+
96
+ assert_raises(GraphQL::ExecutionError) do
97
+ conn.decode("0")
98
+ end
99
+ end
92
100
  end
93
101
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.9
4
+ version: 1.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-14 00:00:00.000000000 Z
11
+ date: 2018-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ips
@@ -334,10 +334,12 @@ files:
334
334
  - lib/generators/graphql/loader_generator.rb
335
335
  - lib/generators/graphql/mutation_generator.rb
336
336
  - lib/generators/graphql/object_generator.rb
337
+ - lib/generators/graphql/scalar_generator.rb
337
338
  - lib/generators/graphql/templates/base_enum.erb
338
339
  - lib/generators/graphql/templates/base_input_object.erb
339
340
  - lib/generators/graphql/templates/base_interface.erb
340
341
  - lib/generators/graphql/templates/base_object.erb
342
+ - lib/generators/graphql/templates/base_scalar.erb
341
343
  - lib/generators/graphql/templates/base_union.erb
342
344
  - lib/generators/graphql/templates/enum.erb
343
345
  - lib/generators/graphql/templates/graphql_controller.erb
@@ -347,6 +349,7 @@ files:
347
349
  - lib/generators/graphql/templates/mutation_type.erb
348
350
  - lib/generators/graphql/templates/object.erb
349
351
  - lib/generators/graphql/templates/query_type.erb
352
+ - lib/generators/graphql/templates/scalar.erb
350
353
  - lib/generators/graphql/templates/schema.erb
351
354
  - lib/generators/graphql/templates/union.erb
352
355
  - lib/generators/graphql/type_generator.rb
@@ -854,6 +857,7 @@ files:
854
857
  - spec/integration/rails/generators/graphql/loader_generator_spec.rb
855
858
  - spec/integration/rails/generators/graphql/mutation_generator_spec.rb
856
859
  - spec/integration/rails/generators/graphql/object_generator_spec.rb
860
+ - spec/integration/rails/generators/graphql/scalar_generator_spec.rb
857
861
  - spec/integration/rails/generators/graphql/union_generator_spec.rb
858
862
  - spec/integration/rails/graphql/input_object_type_spec.rb
859
863
  - spec/integration/rails/graphql/query/variables_spec.rb
@@ -871,7 +875,6 @@ files:
871
875
  - spec/integration/rails/graphql/schema_spec.rb
872
876
  - spec/integration/rails/graphql/tracing/active_support_notifications_tracing_spec.rb
873
877
  - spec/integration/rails/spec_helper.rb
874
- - spec/integration/tmp/app/graphql/types/page_type.rb
875
878
  - spec/spec_helper.rb
876
879
  - spec/support/dummy/data.rb
877
880
  - spec/support/dummy/schema.rb
@@ -912,258 +915,258 @@ signing_key:
912
915
  specification_version: 4
913
916
  summary: A GraphQL language and runtime for Ruby
914
917
  test_files:
915
- - spec/dummy/app/assets/config/manifest.js
916
- - spec/dummy/app/assets/javascripts/application.js
917
- - spec/dummy/app/channels/application_cable/channel.rb
918
- - spec/dummy/app/channels/application_cable/connection.rb
919
- - spec/dummy/app/channels/graphql_channel.rb
918
+ - spec/spec_helper.rb
919
+ - spec/dummy/app/jobs/application_job.rb
920
920
  - spec/dummy/app/controllers/application_controller.rb
921
921
  - spec/dummy/app/controllers/pages_controller.rb
922
- - spec/dummy/app/helpers/application_helper.rb
923
- - spec/dummy/app/jobs/application_job.rb
924
922
  - spec/dummy/app/views/layouts/application.html.erb
925
923
  - spec/dummy/app/views/pages/show.html
926
- - spec/dummy/bin/bundle
927
- - spec/dummy/bin/rails
924
+ - spec/dummy/app/assets/config/manifest.js
925
+ - spec/dummy/app/assets/javascripts/application.js
926
+ - spec/dummy/app/helpers/application_helper.rb
927
+ - spec/dummy/app/channels/application_cable/connection.rb
928
+ - spec/dummy/app/channels/application_cable/channel.rb
929
+ - spec/dummy/app/channels/graphql_channel.rb
930
+ - spec/dummy/test/system/action_cable_subscription_test.rb
931
+ - spec/dummy/test/application_system_test_case.rb
932
+ - spec/dummy/test/test_helper.rb
933
+ - spec/dummy/bin/update
928
934
  - spec/dummy/bin/rake
929
935
  - spec/dummy/bin/setup
930
- - spec/dummy/bin/update
936
+ - spec/dummy/bin/bundle
931
937
  - spec/dummy/bin/yarn
932
- - spec/dummy/config/application.rb
933
- - spec/dummy/config/boot.rb
938
+ - spec/dummy/bin/rails
939
+ - spec/dummy/config/secrets.yml
940
+ - spec/dummy/config/routes.rb
941
+ - spec/dummy/config/locales/en.yml
934
942
  - spec/dummy/config/cable.yml
935
- - spec/dummy/config/environment.rb
936
- - spec/dummy/config/environments/development.rb
937
943
  - spec/dummy/config/environments/production.rb
944
+ - spec/dummy/config/environments/development.rb
938
945
  - spec/dummy/config/environments/test.rb
946
+ - spec/dummy/config/environment.rb
947
+ - spec/dummy/config/application.rb
948
+ - spec/dummy/config/puma.rb
949
+ - spec/dummy/config/boot.rb
939
950
  - spec/dummy/config/initializers/application_controller_renderer.rb
940
951
  - spec/dummy/config/initializers/backtrace_silencers.rb
941
- - spec/dummy/config/initializers/cookies_serializer.rb
942
- - spec/dummy/config/initializers/filter_parameter_logging.rb
943
- - spec/dummy/config/initializers/inflections.rb
944
952
  - spec/dummy/config/initializers/mime_types.rb
953
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
945
954
  - spec/dummy/config/initializers/wrap_parameters.rb
946
- - spec/dummy/config/locales/en.yml
947
- - spec/dummy/config/puma.rb
948
- - spec/dummy/config/routes.rb
949
- - spec/dummy/config/secrets.yml
955
+ - spec/dummy/config/initializers/cookies_serializer.rb
956
+ - spec/dummy/config/initializers/inflections.rb
950
957
  - spec/dummy/config.ru
951
- - spec/dummy/Gemfile
952
- - spec/dummy/package.json
953
- - spec/dummy/public/404.html
958
+ - spec/dummy/README.md
959
+ - spec/dummy/Rakefile
960
+ - spec/dummy/public/favicon.ico
954
961
  - spec/dummy/public/422.html
962
+ - spec/dummy/public/apple-touch-icon.png
955
963
  - spec/dummy/public/500.html
964
+ - spec/dummy/public/404.html
956
965
  - spec/dummy/public/apple-touch-icon-precomposed.png
957
- - spec/dummy/public/apple-touch-icon.png
958
- - spec/dummy/public/favicon.ico
959
966
  - spec/dummy/public/robots.txt
960
- - spec/dummy/Rakefile
961
- - spec/dummy/README.md
962
- - spec/dummy/test/application_system_test_case.rb
963
- - spec/dummy/test/system/action_cable_subscription_test.rb
964
- - spec/dummy/test/test_helper.rb
965
- - spec/fixtures/upgrader/account.original.rb
966
- - spec/fixtures/upgrader/account.transformed.rb
967
- - spec/fixtures/upgrader/blame_range.original.rb
968
- - spec/fixtures/upgrader/blame_range.transformed.rb
969
- - spec/fixtures/upgrader/date_time.original.rb
970
- - spec/fixtures/upgrader/date_time.transformed.rb
971
- - spec/fixtures/upgrader/delete_project.original.rb
972
- - spec/fixtures/upgrader/delete_project.transformed.rb
973
- - spec/fixtures/upgrader/gist_order_field.original.rb
974
- - spec/fixtures/upgrader/gist_order_field.transformed.rb
975
- - spec/fixtures/upgrader/increment_count.original.rb
976
- - spec/fixtures/upgrader/increment_count.transformed.rb
977
- - spec/fixtures/upgrader/photo.original.rb
978
- - spec/fixtures/upgrader/photo.transformed.rb
979
- - spec/fixtures/upgrader/release_order.original.rb
980
- - spec/fixtures/upgrader/release_order.transformed.rb
981
- - spec/fixtures/upgrader/starrable.original.rb
982
- - spec/fixtures/upgrader/starrable.transformed.rb
983
- - spec/fixtures/upgrader/subscribable.original.rb
984
- - spec/fixtures/upgrader/subscribable.transformed.rb
985
- - spec/fixtures/upgrader/type_x.original.rb
986
- - spec/fixtures/upgrader/type_x.transformed.rb
967
+ - spec/dummy/package.json
968
+ - spec/dummy/Gemfile
969
+ - spec/integration/mongoid/spec_helper.rb
970
+ - spec/integration/mongoid/star_trek/schema.rb
971
+ - spec/integration/mongoid/star_trek/data.rb
972
+ - spec/integration/mongoid/graphql/relay/mongo_relation_connection_spec.rb
973
+ - spec/integration/rails/spec_helper.rb
974
+ - spec/integration/rails/data.rb
975
+ - spec/integration/rails/graphql/tracing/active_support_notifications_tracing_spec.rb
976
+ - spec/integration/rails/graphql/input_object_type_spec.rb
977
+ - spec/integration/rails/graphql/relay/node_spec.rb
978
+ - spec/integration/rails/graphql/relay/connection_resolve_spec.rb
979
+ - spec/integration/rails/graphql/relay/range_add_spec.rb
980
+ - spec/integration/rails/graphql/relay/connection_instrumentation_spec.rb
981
+ - spec/integration/rails/graphql/relay/edge_spec.rb
982
+ - spec/integration/rails/graphql/relay/array_connection_spec.rb
983
+ - spec/integration/rails/graphql/relay/relation_connection_spec.rb
984
+ - spec/integration/rails/graphql/relay/connection_type_spec.rb
985
+ - spec/integration/rails/graphql/relay/mutation_spec.rb
986
+ - spec/integration/rails/graphql/relay/base_connection_spec.rb
987
+ - spec/integration/rails/graphql/relay/page_info_spec.rb
988
+ - spec/integration/rails/graphql/query/variables_spec.rb
989
+ - spec/integration/rails/graphql/schema_spec.rb
990
+ - spec/integration/rails/generators/graphql/install_generator_spec.rb
991
+ - spec/integration/rails/generators/graphql/scalar_generator_spec.rb
992
+ - spec/integration/rails/generators/graphql/loader_generator_spec.rb
993
+ - spec/integration/rails/generators/graphql/mutation_generator_spec.rb
994
+ - spec/integration/rails/generators/graphql/interface_generator_spec.rb
995
+ - spec/integration/rails/generators/graphql/enum_generator_spec.rb
996
+ - spec/integration/rails/generators/graphql/union_generator_spec.rb
997
+ - spec/integration/rails/generators/graphql/object_generator_spec.rb
998
+ - spec/integration/rails/generators/base_generator_test.rb
999
+ - spec/support/star_wars/schema.rb
1000
+ - spec/support/static_validation_helpers.rb
1001
+ - spec/support/dummy/schema.rb
1002
+ - spec/support/dummy/data.rb
1003
+ - spec/support/magic_cards/schema.graphql
1004
+ - spec/support/new_relic.rb
1005
+ - spec/support/parser/filename_example_error_1.graphql
1006
+ - spec/support/parser/filename_example_error_2.graphql
1007
+ - spec/support/parser/filename_example.graphql
1008
+ - spec/support/lazy_helpers.rb
1009
+ - spec/support/minimum_input_object.rb
1010
+ - spec/support/global_id.rb
1011
+ - spec/support/skylight.rb
1012
+ - spec/support/jazz.rb
1013
+ - spec/graphql/compatibility/query_parser_specification_spec.rb
1014
+ - spec/graphql/compatibility/execution_specification_spec.rb
1015
+ - spec/graphql/compatibility/schema_parser_specification_spec.rb
1016
+ - spec/graphql/compatibility/lazy_execution_specification_spec.rb
1017
+ - spec/graphql/float_type_spec.rb
1018
+ - spec/graphql/tracing/skylight_tracing_spec.rb
1019
+ - spec/graphql/tracing/prometheus_tracing_spec.rb
1020
+ - spec/graphql/tracing/new_relic_tracing_spec.rb
1021
+ - spec/graphql/tracing/scout_tracing_spec.rb
1022
+ - spec/graphql/tracing/platform_tracing_spec.rb
1023
+ - spec/graphql/boolean_type_spec.rb
1024
+ - spec/graphql/rake_task_spec.rb
1025
+ - spec/graphql/int_type_spec.rb
1026
+ - spec/graphql/types/iso_8601_date_time_spec.rb
1027
+ - spec/graphql/field_spec.rb
1028
+ - spec/graphql/analysis/max_query_depth_spec.rb
1029
+ - spec/graphql/analysis/max_query_complexity_spec.rb
987
1030
  - spec/graphql/analysis/analyze_query_spec.rb
1031
+ - spec/graphql/analysis/query_depth_spec.rb
988
1032
  - spec/graphql/analysis/field_usage_spec.rb
989
- - spec/graphql/analysis/max_query_complexity_spec.rb
990
- - spec/graphql/analysis/max_query_depth_spec.rb
991
1033
  - spec/graphql/analysis/query_complexity_spec.rb
992
- - spec/graphql/analysis/query_depth_spec.rb
993
- - spec/graphql/argument_spec.rb
994
- - spec/graphql/authorization_spec.rb
995
1034
  - spec/graphql/backtrace_spec.rb
996
- - spec/graphql/base_type_spec.rb
997
- - spec/graphql/boolean_type_spec.rb
998
- - spec/graphql/compatibility/execution_specification_spec.rb
999
- - spec/graphql/compatibility/lazy_execution_specification_spec.rb
1000
- - spec/graphql/compatibility/query_parser_specification_spec.rb
1001
- - spec/graphql/compatibility/schema_parser_specification_spec.rb
1002
- - spec/graphql/define/assign_argument_spec.rb
1003
- - spec/graphql/define/instance_definable_spec.rb
1004
- - spec/graphql/directive/skip_directive_spec.rb
1005
- - spec/graphql/directive_spec.rb
1006
- - spec/graphql/enum_type_spec.rb
1007
- - spec/graphql/execution/execute_spec.rb
1008
- - spec/graphql/execution/instrumentation_spec.rb
1009
- - spec/graphql/execution/lazy/lazy_method_map_spec.rb
1010
- - spec/graphql/execution/lazy_spec.rb
1011
- - spec/graphql/execution/multiplex_spec.rb
1012
- - spec/graphql/execution/typecast_spec.rb
1013
1035
  - spec/graphql/execution_error_spec.rb
1014
- - spec/graphql/field_spec.rb
1015
- - spec/graphql/float_type_spec.rb
1016
- - spec/graphql/function_spec.rb
1017
- - spec/graphql/id_type_spec.rb
1036
+ - spec/graphql/define/instance_definable_spec.rb
1037
+ - spec/graphql/define/assign_argument_spec.rb
1018
1038
  - spec/graphql/input_object_type_spec.rb
1019
- - spec/graphql/int_type_spec.rb
1020
- - spec/graphql/interface_type_spec.rb
1021
- - spec/graphql/internal_representation/print_spec.rb
1022
- - spec/graphql/internal_representation/rewrite_spec.rb
1023
- - spec/graphql/introspection/directive_type_spec.rb
1024
- - spec/graphql/introspection/input_value_type_spec.rb
1025
- - spec/graphql/introspection/introspection_query_spec.rb
1026
- - spec/graphql/introspection/schema_type_spec.rb
1027
- - spec/graphql/introspection/type_type_spec.rb
1028
- - spec/graphql/language/block_string_spec.rb
1039
+ - spec/graphql/static_validation/validator_spec.rb
1040
+ - spec/graphql/static_validation/rules/mutation_root_exists_spec.rb
1041
+ - spec/graphql/static_validation/rules/no_definitions_are_present_spec.rb
1042
+ - spec/graphql/static_validation/rules/fragment_names_are_unique_spec.rb
1043
+ - spec/graphql/static_validation/rules/arguments_are_defined_spec.rb
1044
+ - spec/graphql/static_validation/rules/fragment_types_exist_spec.rb
1045
+ - spec/graphql/static_validation/rules/fields_have_appropriate_selections_spec.rb
1046
+ - spec/graphql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb
1047
+ - spec/graphql/static_validation/rules/fragments_are_finite_spec.rb
1048
+ - spec/graphql/static_validation/rules/variables_are_used_and_defined_spec.rb
1049
+ - spec/graphql/static_validation/rules/variable_names_are_unique_spec.rb
1050
+ - spec/graphql/static_validation/rules/unique_directives_per_location_spec.rb
1051
+ - spec/graphql/static_validation/rules/directives_are_in_valid_locations_spec.rb
1052
+ - spec/graphql/static_validation/rules/fragments_are_named_spec.rb
1053
+ - spec/graphql/static_validation/rules/required_arguments_are_present_spec.rb
1054
+ - spec/graphql/static_validation/rules/fragments_are_on_composite_types_spec.rb
1055
+ - spec/graphql/static_validation/rules/variable_usages_are_allowed_spec.rb
1056
+ - spec/graphql/static_validation/rules/subscription_root_exists_spec.rb
1057
+ - spec/graphql/static_validation/rules/fields_are_defined_on_type_spec.rb
1058
+ - spec/graphql/static_validation/rules/fields_will_merge_spec.rb
1059
+ - spec/graphql/static_validation/rules/operation_names_are_valid_spec.rb
1060
+ - spec/graphql/static_validation/rules/argument_names_are_unique_spec.rb
1061
+ - spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb
1062
+ - spec/graphql/static_validation/rules/directives_are_defined_spec.rb
1063
+ - spec/graphql/static_validation/rules/variables_are_input_types_spec.rb
1064
+ - spec/graphql/static_validation/rules/fragment_spreads_are_possible_spec.rb
1065
+ - spec/graphql/static_validation/rules/fragments_are_used_spec.rb
1066
+ - spec/graphql/static_validation/type_stack_spec.rb
1067
+ - spec/graphql/list_type_spec.rb
1068
+ - spec/graphql/authorization_spec.rb
1029
1069
  - spec/graphql/language/definition_slice_spec.rb
1030
1070
  - spec/graphql/language/document_from_schema_definition_spec.rb
1031
- - spec/graphql/language/equality_spec.rb
1032
- - spec/graphql/language/generation_spec.rb
1033
- - spec/graphql/language/lexer_spec.rb
1034
- - spec/graphql/language/nodes_spec.rb
1035
1071
  - spec/graphql/language/parser_spec.rb
1036
1072
  - spec/graphql/language/printer_spec.rb
1073
+ - spec/graphql/language/generation_spec.rb
1037
1074
  - spec/graphql/language/visitor_spec.rb
1038
- - spec/graphql/list_type_spec.rb
1039
- - spec/graphql/non_null_type_spec.rb
1075
+ - spec/graphql/language/equality_spec.rb
1076
+ - spec/graphql/language/nodes_spec.rb
1077
+ - spec/graphql/language/block_string_spec.rb
1078
+ - spec/graphql/language/lexer_spec.rb
1079
+ - spec/graphql/introspection/introspection_query_spec.rb
1080
+ - spec/graphql/introspection/input_value_type_spec.rb
1081
+ - spec/graphql/introspection/schema_type_spec.rb
1082
+ - spec/graphql/introspection/directive_type_spec.rb
1083
+ - spec/graphql/introspection/type_type_spec.rb
1084
+ - spec/graphql/directive_spec.rb
1040
1085
  - spec/graphql/object_type_spec.rb
1041
- - spec/graphql/query/arguments_spec.rb
1042
- - spec/graphql/query/context_spec.rb
1043
- - spec/graphql/query/executor_spec.rb
1044
- - spec/graphql/query/literal_input_spec.rb
1045
- - spec/graphql/query/result_spec.rb
1046
- - spec/graphql/query/serial_execution/value_resolution_spec.rb
1047
- - spec/graphql/query_spec.rb
1048
- - spec/graphql/rake_task_spec.rb
1049
- - spec/graphql/scalar_type_spec.rb
1050
- - spec/graphql/schema/argument_spec.rb
1051
- - spec/graphql/schema/build_from_definition_spec.rb
1086
+ - spec/graphql/subscriptions/serialize_spec.rb
1087
+ - spec/graphql/union_type_spec.rb
1052
1088
  - spec/graphql/schema/catchall_middleware_spec.rb
1053
- - spec/graphql/schema/enum_spec.rb
1054
- - spec/graphql/schema/enum_value_spec.rb
1089
+ - spec/graphql/schema/rescue_middleware_spec.rb
1090
+ - spec/graphql/schema/warden_spec.rb
1091
+ - spec/graphql/schema/loader_spec.rb
1092
+ - spec/graphql/schema/unique_within_type_spec.rb
1055
1093
  - spec/graphql/schema/field_spec.rb
1056
- - spec/graphql/schema/finder_spec.rb
1057
- - spec/graphql/schema/input_object_spec.rb
1058
- - spec/graphql/schema/instrumentation_spec.rb
1059
- - spec/graphql/schema/interface_spec.rb
1060
- - spec/graphql/schema/introspection_system_spec.rb
1094
+ - spec/graphql/schema/validation_spec.rb
1095
+ - spec/graphql/schema/enum_value_spec.rb
1061
1096
  - spec/graphql/schema/list_spec.rb
1062
- - spec/graphql/schema/loader_spec.rb
1097
+ - spec/graphql/schema/scalar_spec.rb
1098
+ - spec/graphql/schema/object_spec.rb
1099
+ - spec/graphql/schema/middleware_chain_spec.rb
1100
+ - spec/graphql/schema/build_from_definition_spec.rb
1101
+ - spec/graphql/schema/finder_spec.rb
1102
+ - spec/graphql/schema/enum_spec.rb
1103
+ - spec/graphql/schema/member/type_system_helpers_spec.rb
1063
1104
  - spec/graphql/schema/member/accepts_definition_spec.rb
1064
1105
  - spec/graphql/schema/member/build_type_spec.rb
1065
1106
  - spec/graphql/schema/member/has_fields_spec.rb
1066
1107
  - spec/graphql/schema/member/scoped_spec.rb
1067
- - spec/graphql/schema/member/type_system_helpers_spec.rb
1068
- - spec/graphql/schema/middleware_chain_spec.rb
1069
- - spec/graphql/schema/mutation_spec.rb
1070
- - spec/graphql/schema/non_null_spec.rb
1071
- - spec/graphql/schema/object_spec.rb
1072
- - spec/graphql/schema/printer_spec.rb
1073
- - spec/graphql/schema/relay_classic_mutation_spec.rb
1074
- - spec/graphql/schema/rescue_middleware_spec.rb
1075
- - spec/graphql/schema/resolver_spec.rb
1076
- - spec/graphql/schema/scalar_spec.rb
1108
+ - spec/graphql/schema/instrumentation_spec.rb
1077
1109
  - spec/graphql/schema/timeout_middleware_spec.rb
1078
1110
  - spec/graphql/schema/traversal_spec.rb
1079
1111
  - spec/graphql/schema/type_expression_spec.rb
1112
+ - spec/graphql/schema/non_null_spec.rb
1113
+ - spec/graphql/schema/input_object_spec.rb
1114
+ - spec/graphql/schema/printer_spec.rb
1115
+ - spec/graphql/schema/mutation_spec.rb
1116
+ - spec/graphql/schema/resolver_spec.rb
1117
+ - spec/graphql/schema/relay_classic_mutation_spec.rb
1118
+ - spec/graphql/schema/introspection_system_spec.rb
1119
+ - spec/graphql/schema/argument_spec.rb
1080
1120
  - spec/graphql/schema/union_spec.rb
1081
- - spec/graphql/schema/unique_within_type_spec.rb
1082
- - spec/graphql/schema/validation_spec.rb
1083
- - spec/graphql/schema/warden_spec.rb
1084
- - spec/graphql/static_validation/rules/argument_literals_are_compatible_spec.rb
1085
- - spec/graphql/static_validation/rules/argument_names_are_unique_spec.rb
1086
- - spec/graphql/static_validation/rules/arguments_are_defined_spec.rb
1087
- - spec/graphql/static_validation/rules/directives_are_defined_spec.rb
1088
- - spec/graphql/static_validation/rules/directives_are_in_valid_locations_spec.rb
1089
- - spec/graphql/static_validation/rules/fields_are_defined_on_type_spec.rb
1090
- - spec/graphql/static_validation/rules/fields_have_appropriate_selections_spec.rb
1091
- - spec/graphql/static_validation/rules/fields_will_merge_spec.rb
1092
- - spec/graphql/static_validation/rules/fragment_names_are_unique_spec.rb
1093
- - spec/graphql/static_validation/rules/fragment_spreads_are_possible_spec.rb
1094
- - spec/graphql/static_validation/rules/fragment_types_exist_spec.rb
1095
- - spec/graphql/static_validation/rules/fragments_are_finite_spec.rb
1096
- - spec/graphql/static_validation/rules/fragments_are_named_spec.rb
1097
- - spec/graphql/static_validation/rules/fragments_are_on_composite_types_spec.rb
1098
- - spec/graphql/static_validation/rules/fragments_are_used_spec.rb
1099
- - spec/graphql/static_validation/rules/mutation_root_exists_spec.rb
1100
- - spec/graphql/static_validation/rules/no_definitions_are_present_spec.rb
1101
- - spec/graphql/static_validation/rules/operation_names_are_valid_spec.rb
1102
- - spec/graphql/static_validation/rules/required_arguments_are_present_spec.rb
1103
- - spec/graphql/static_validation/rules/subscription_root_exists_spec.rb
1104
- - spec/graphql/static_validation/rules/unique_directives_per_location_spec.rb
1105
- - spec/graphql/static_validation/rules/variable_default_values_are_correctly_typed_spec.rb
1106
- - spec/graphql/static_validation/rules/variable_names_are_unique_spec.rb
1107
- - spec/graphql/static_validation/rules/variable_usages_are_allowed_spec.rb
1108
- - spec/graphql/static_validation/rules/variables_are_input_types_spec.rb
1109
- - spec/graphql/static_validation/rules/variables_are_used_and_defined_spec.rb
1110
- - spec/graphql/static_validation/type_stack_spec.rb
1111
- - spec/graphql/static_validation/validator_spec.rb
1121
+ - spec/graphql/schema/interface_spec.rb
1122
+ - spec/graphql/directive/skip_directive_spec.rb
1123
+ - spec/graphql/non_null_type_spec.rb
1124
+ - spec/graphql/base_type_spec.rb
1125
+ - spec/graphql/execution/execute_spec.rb
1126
+ - spec/graphql/execution/instrumentation_spec.rb
1127
+ - spec/graphql/execution/multiplex_spec.rb
1128
+ - spec/graphql/execution/typecast_spec.rb
1129
+ - spec/graphql/execution/lazy/lazy_method_map_spec.rb
1130
+ - spec/graphql/execution/lazy_spec.rb
1131
+ - spec/graphql/upgrader/schema_spec.rb
1132
+ - spec/graphql/upgrader/member_spec.rb
1133
+ - spec/graphql/internal_representation/print_spec.rb
1134
+ - spec/graphql/internal_representation/rewrite_spec.rb
1135
+ - spec/graphql/tracing_spec.rb
1136
+ - spec/graphql/scalar_type_spec.rb
1137
+ - spec/graphql/argument_spec.rb
1138
+ - spec/graphql/interface_type_spec.rb
1139
+ - spec/graphql/function_spec.rb
1140
+ - spec/graphql/query_spec.rb
1141
+ - spec/graphql/query/context_spec.rb
1142
+ - spec/graphql/query/serial_execution/value_resolution_spec.rb
1143
+ - spec/graphql/query/result_spec.rb
1144
+ - spec/graphql/query/literal_input_spec.rb
1145
+ - spec/graphql/query/executor_spec.rb
1146
+ - spec/graphql/query/arguments_spec.rb
1112
1147
  - spec/graphql/string_type_spec.rb
1113
- - spec/graphql/subscriptions/serialize_spec.rb
1148
+ - spec/graphql/enum_type_spec.rb
1114
1149
  - spec/graphql/subscriptions_spec.rb
1115
- - spec/graphql/tracing/new_relic_tracing_spec.rb
1116
- - spec/graphql/tracing/platform_tracing_spec.rb
1117
- - spec/graphql/tracing/prometheus_tracing_spec.rb
1118
- - spec/graphql/tracing/scout_tracing_spec.rb
1119
- - spec/graphql/tracing/skylight_tracing_spec.rb
1120
- - spec/graphql/tracing_spec.rb
1121
- - spec/graphql/types/iso_8601_date_time_spec.rb
1122
- - spec/graphql/union_type_spec.rb
1123
- - spec/graphql/upgrader/member_spec.rb
1124
- - spec/graphql/upgrader/schema_spec.rb
1125
- - spec/integration/mongoid/graphql/relay/mongo_relation_connection_spec.rb
1126
- - spec/integration/mongoid/spec_helper.rb
1127
- - spec/integration/mongoid/star_trek/data.rb
1128
- - spec/integration/mongoid/star_trek/schema.rb
1129
- - spec/integration/rails/data.rb
1130
- - spec/integration/rails/generators/base_generator_test.rb
1131
- - spec/integration/rails/generators/graphql/enum_generator_spec.rb
1132
- - spec/integration/rails/generators/graphql/install_generator_spec.rb
1133
- - spec/integration/rails/generators/graphql/interface_generator_spec.rb
1134
- - spec/integration/rails/generators/graphql/loader_generator_spec.rb
1135
- - spec/integration/rails/generators/graphql/mutation_generator_spec.rb
1136
- - spec/integration/rails/generators/graphql/object_generator_spec.rb
1137
- - spec/integration/rails/generators/graphql/union_generator_spec.rb
1138
- - spec/integration/rails/graphql/input_object_type_spec.rb
1139
- - spec/integration/rails/graphql/query/variables_spec.rb
1140
- - spec/integration/rails/graphql/relay/array_connection_spec.rb
1141
- - spec/integration/rails/graphql/relay/base_connection_spec.rb
1142
- - spec/integration/rails/graphql/relay/connection_instrumentation_spec.rb
1143
- - spec/integration/rails/graphql/relay/connection_resolve_spec.rb
1144
- - spec/integration/rails/graphql/relay/connection_type_spec.rb
1145
- - spec/integration/rails/graphql/relay/edge_spec.rb
1146
- - spec/integration/rails/graphql/relay/mutation_spec.rb
1147
- - spec/integration/rails/graphql/relay/node_spec.rb
1148
- - spec/integration/rails/graphql/relay/page_info_spec.rb
1149
- - spec/integration/rails/graphql/relay/range_add_spec.rb
1150
- - spec/integration/rails/graphql/relay/relation_connection_spec.rb
1151
- - spec/integration/rails/graphql/schema_spec.rb
1152
- - spec/integration/rails/graphql/tracing/active_support_notifications_tracing_spec.rb
1153
- - spec/integration/rails/spec_helper.rb
1154
- - spec/integration/tmp/app/graphql/types/page_type.rb
1155
- - spec/spec_helper.rb
1156
- - spec/support/dummy/data.rb
1157
- - spec/support/dummy/schema.rb
1158
- - spec/support/global_id.rb
1159
- - spec/support/jazz.rb
1160
- - spec/support/lazy_helpers.rb
1161
- - spec/support/magic_cards/schema.graphql
1162
- - spec/support/minimum_input_object.rb
1163
- - spec/support/new_relic.rb
1164
- - spec/support/parser/filename_example.graphql
1165
- - spec/support/parser/filename_example_error_1.graphql
1166
- - spec/support/parser/filename_example_error_2.graphql
1167
- - spec/support/skylight.rb
1168
- - spec/support/star_wars/schema.rb
1169
- - spec/support/static_validation_helpers.rb
1150
+ - spec/graphql/id_type_spec.rb
1151
+ - spec/fixtures/upgrader/type_x.transformed.rb
1152
+ - spec/fixtures/upgrader/delete_project.transformed.rb
1153
+ - spec/fixtures/upgrader/gist_order_field.original.rb
1154
+ - spec/fixtures/upgrader/photo.transformed.rb
1155
+ - spec/fixtures/upgrader/subscribable.transformed.rb
1156
+ - spec/fixtures/upgrader/subscribable.original.rb
1157
+ - spec/fixtures/upgrader/delete_project.original.rb
1158
+ - spec/fixtures/upgrader/starrable.transformed.rb
1159
+ - spec/fixtures/upgrader/release_order.original.rb
1160
+ - spec/fixtures/upgrader/increment_count.original.rb
1161
+ - spec/fixtures/upgrader/account.transformed.rb
1162
+ - spec/fixtures/upgrader/photo.original.rb
1163
+ - spec/fixtures/upgrader/starrable.original.rb
1164
+ - spec/fixtures/upgrader/increment_count.transformed.rb
1165
+ - spec/fixtures/upgrader/date_time.transformed.rb
1166
+ - spec/fixtures/upgrader/type_x.original.rb
1167
+ - spec/fixtures/upgrader/blame_range.transformed.rb
1168
+ - spec/fixtures/upgrader/release_order.transformed.rb
1169
+ - spec/fixtures/upgrader/date_time.original.rb
1170
+ - spec/fixtures/upgrader/blame_range.original.rb
1171
+ - spec/fixtures/upgrader/gist_order_field.transformed.rb
1172
+ - spec/fixtures/upgrader/account.original.rb
@@ -1,4 +0,0 @@
1
- module Types
2
- class PageType < Types::BaseObject
3
- end
4
- end