graphql_devise 0.11.4 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.travis.yml +7 -0
  4. data/Appraisals +14 -0
  5. data/CHANGELOG.md +56 -0
  6. data/Gemfile +2 -0
  7. data/README.md +219 -20
  8. data/Rakefile +2 -0
  9. data/app/controllers/graphql_devise/application_controller.rb +6 -5
  10. data/app/controllers/graphql_devise/concerns/set_user_by_token.rb +31 -0
  11. data/app/controllers/graphql_devise/graphql_controller.rb +4 -0
  12. data/app/helpers/graphql_devise/application_helper.rb +2 -0
  13. data/app/helpers/graphql_devise/mailer_helper.rb +4 -2
  14. data/app/models/graphql_devise/concerns/model.rb +10 -0
  15. data/app/views/graphql_devise/mailer/confirmation_instructions.html.erb +1 -1
  16. data/app/views/graphql_devise/mailer/reset_password_instructions.html.erb +1 -1
  17. data/config/locales/en.yml +1 -0
  18. data/config/routes.rb +4 -0
  19. data/graphql_devise.gemspec +6 -4
  20. data/lib/generators/graphql_devise/install_generator.rb +30 -5
  21. data/lib/graphql_devise.rb +26 -10
  22. data/lib/graphql_devise/concerns/controller_methods.rb +2 -0
  23. data/lib/graphql_devise/default_operations/mutations.rb +8 -6
  24. data/lib/graphql_devise/default_operations/resolvers.rb +4 -2
  25. data/lib/graphql_devise/engine.rb +2 -0
  26. data/lib/graphql_devise/errors/authentication_error.rb +9 -0
  27. data/lib/graphql_devise/{detailed_user_error.rb → errors/detailed_user_error.rb} +3 -1
  28. data/lib/graphql_devise/errors/error_codes.rb +8 -0
  29. data/lib/graphql_devise/errors/execution_error.rb +6 -0
  30. data/lib/graphql_devise/{user_error.rb → errors/user_error.rb} +3 -1
  31. data/lib/graphql_devise/model/with_email_updater.rb +74 -0
  32. data/lib/graphql_devise/mount_method/operation_preparer.rb +4 -2
  33. data/lib/graphql_devise/mount_method/operation_preparers/custom_operation_preparer.rb +2 -0
  34. data/lib/graphql_devise/mount_method/operation_preparers/default_operation_preparer.rb +8 -2
  35. data/lib/graphql_devise/mount_method/operation_preparers/gql_name_setter.rb +3 -1
  36. data/lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb +5 -2
  37. data/lib/graphql_devise/mount_method/operation_preparers/resolver_type_setter.rb +3 -1
  38. data/lib/graphql_devise/mount_method/operation_preparers/resource_name_setter.rb +4 -2
  39. data/lib/graphql_devise/mount_method/operation_sanitizer.rb +2 -0
  40. data/lib/graphql_devise/mount_method/option_sanitizer.rb +2 -0
  41. data/lib/graphql_devise/mount_method/option_sanitizers/array_checker.rb +2 -0
  42. data/lib/graphql_devise/mount_method/option_sanitizers/class_checker.rb +2 -0
  43. data/lib/graphql_devise/mount_method/option_sanitizers/hash_checker.rb +2 -0
  44. data/lib/graphql_devise/mount_method/option_sanitizers/string_checker.rb +2 -0
  45. data/lib/graphql_devise/mount_method/option_validators/provided_operations_validator.rb +2 -0
  46. data/lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb +2 -0
  47. data/lib/graphql_devise/mount_method/option_validators/supported_operations_validator.rb +2 -0
  48. data/lib/graphql_devise/mount_method/options_validator.rb +2 -0
  49. data/lib/graphql_devise/mount_method/supported_options.rb +2 -0
  50. data/lib/graphql_devise/mutations/base.rb +2 -0
  51. data/lib/graphql_devise/mutations/login.rb +2 -0
  52. data/lib/graphql_devise/mutations/logout.rb +2 -0
  53. data/lib/graphql_devise/mutations/resend_confirmation.rb +5 -5
  54. data/lib/graphql_devise/mutations/send_password_reset.rb +7 -2
  55. data/lib/graphql_devise/mutations/sign_up.rb +5 -6
  56. data/lib/graphql_devise/mutations/update_password.rb +2 -0
  57. data/lib/graphql_devise/rails/routes.rb +7 -72
  58. data/lib/graphql_devise/resolvers/base.rb +2 -0
  59. data/lib/graphql_devise/resolvers/check_password_token.rb +2 -0
  60. data/lib/graphql_devise/resolvers/confirm_account.rb +4 -2
  61. data/lib/graphql_devise/resolvers/dummy.rb +2 -0
  62. data/lib/graphql_devise/resource_loader.rb +89 -0
  63. data/lib/graphql_devise/schema.rb +2 -0
  64. data/lib/graphql_devise/schema_plugin.rb +114 -0
  65. data/lib/graphql_devise/types/authenticatable_type.rb +2 -0
  66. data/lib/graphql_devise/types/credential_type.rb +2 -0
  67. data/lib/graphql_devise/types/mutation_type.rb +2 -0
  68. data/lib/graphql_devise/types/query_type.rb +2 -0
  69. data/lib/graphql_devise/version.rb +3 -1
  70. data/spec/dummy/Rakefile +2 -0
  71. data/spec/dummy/app/controllers/api/v1/graphql_controller.rb +38 -3
  72. data/spec/dummy/app/controllers/application_controller.rb +2 -0
  73. data/spec/dummy/app/graphql/dummy_schema.rb +21 -0
  74. data/spec/dummy/app/graphql/interpreter_schema.rb +11 -0
  75. data/spec/dummy/app/graphql/mutations/login.rb +2 -0
  76. data/spec/dummy/app/graphql/mutations/register_confirmed_user.rb +2 -0
  77. data/spec/dummy/app/graphql/mutations/sign_up.rb +2 -0
  78. data/spec/dummy/app/graphql/mutations/update_user.rb +22 -0
  79. data/spec/dummy/app/graphql/resolvers/public_user.rb +2 -0
  80. data/spec/dummy/app/graphql/resolvers/user_show.rb +2 -0
  81. data/spec/dummy/app/graphql/types/base_object.rb +2 -0
  82. data/spec/dummy/app/graphql/types/custom_admin_type.rb +2 -0
  83. data/spec/dummy/app/graphql/types/mutation_type.rb +4 -1
  84. data/spec/dummy/app/graphql/types/query_type.rb +12 -0
  85. data/spec/dummy/app/graphql/types/user_type.rb +2 -0
  86. data/spec/dummy/app/jobs/application_job.rb +2 -0
  87. data/spec/dummy/app/mailers/application_mailer.rb +2 -0
  88. data/spec/dummy/app/models/admin.rb +2 -0
  89. data/spec/dummy/app/models/application_record.rb +2 -0
  90. data/spec/dummy/app/models/guest.rb +2 -0
  91. data/spec/dummy/app/models/schema_user.rb +13 -0
  92. data/spec/dummy/app/models/user.rb +2 -0
  93. data/spec/dummy/app/models/users.rb +2 -0
  94. data/spec/dummy/app/models/users/customer.rb +2 -0
  95. data/spec/dummy/config.ru +2 -0
  96. data/spec/dummy/config/application.rb +2 -0
  97. data/spec/dummy/config/environment.rb +2 -0
  98. data/spec/dummy/config/environments/development.rb +2 -0
  99. data/spec/dummy/config/environments/production.rb +2 -0
  100. data/spec/dummy/config/environments/test.rb +2 -0
  101. data/spec/dummy/config/initializers/application_controller_renderer.rb +2 -0
  102. data/spec/dummy/config/initializers/backtrace_silencers.rb +2 -0
  103. data/spec/dummy/config/initializers/cors.rb +2 -0
  104. data/spec/dummy/config/initializers/devise_token_auth.rb +2 -0
  105. data/spec/dummy/config/initializers/filter_parameter_logging.rb +2 -0
  106. data/spec/dummy/config/initializers/i18n.rb +2 -0
  107. data/spec/dummy/config/initializers/inflections.rb +2 -0
  108. data/spec/dummy/config/initializers/mime_types.rb +2 -0
  109. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -0
  110. data/spec/dummy/config/puma.rb +2 -0
  111. data/spec/dummy/config/routes.rb +5 -0
  112. data/spec/dummy/config/spring.rb +2 -0
  113. data/spec/dummy/db/migrate/20190815114303_create_users.rb +2 -0
  114. data/spec/dummy/db/migrate/20190824215150_add_auth_available_to_users.rb +2 -0
  115. data/spec/dummy/db/migrate/20190916012505_create_admins.rb +2 -0
  116. data/spec/dummy/db/migrate/20191013213045_create_guests.rb +2 -0
  117. data/spec/dummy/db/migrate/20200321121807_create_users_customers.rb +2 -0
  118. data/spec/dummy/db/migrate/20200621182414_remove_uncofirmed_email_from_admins.rb +7 -0
  119. data/spec/dummy/db/migrate/20200623003142_create_schema_users.rb +46 -0
  120. data/spec/dummy/db/schema.rb +30 -2
  121. data/spec/dummy/db/seeds.rb +2 -0
  122. data/spec/factories/admins.rb +2 -0
  123. data/spec/factories/guests.rb +2 -0
  124. data/spec/factories/schema_users.rb +13 -0
  125. data/spec/factories/users.rb +2 -0
  126. data/spec/factories/users_customers.rb +2 -0
  127. data/spec/generators/graphql_devise/install_generator_spec.rb +23 -0
  128. data/spec/graphql_devise/model/with_email_updater_spec.rb +131 -0
  129. data/spec/graphql_devise_spec.rb +2 -0
  130. data/spec/models/user_spec.rb +2 -0
  131. data/spec/rails_helper.rb +3 -1
  132. data/spec/requests/graphql_controller_spec.rb +82 -0
  133. data/spec/requests/mutations/additional_mutations_spec.rb +2 -0
  134. data/spec/requests/mutations/additional_queries_spec.rb +2 -0
  135. data/spec/requests/mutations/login_spec.rb +2 -0
  136. data/spec/requests/mutations/logout_spec.rb +2 -0
  137. data/spec/requests/mutations/resend_confirmation_spec.rb +46 -29
  138. data/spec/requests/mutations/send_password_reset_spec.rb +42 -12
  139. data/spec/requests/mutations/sign_up_spec.rb +2 -0
  140. data/spec/requests/mutations/update_password_spec.rb +2 -0
  141. data/spec/requests/queries/check_password_token_spec.rb +2 -0
  142. data/spec/requests/queries/confirm_account_spec.rb +9 -1
  143. data/spec/requests/user_controller_spec.rb +237 -23
  144. data/spec/services/mount_method/operation_preparer_spec.rb +10 -3
  145. data/spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb +3 -1
  146. data/spec/services/mount_method/operation_preparers/default_operation_preparer_spec.rb +17 -8
  147. data/spec/services/mount_method/operation_preparers/gql_name_setter_spec.rb +2 -0
  148. data/spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb +20 -4
  149. data/spec/services/mount_method/operation_preparers/resolver_type_setter_spec.rb +2 -0
  150. data/spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb +3 -1
  151. data/spec/services/mount_method/operation_sanitizer_spec.rb +2 -0
  152. data/spec/services/mount_method/option_sanitizer_spec.rb +2 -0
  153. data/spec/services/mount_method/option_sanitizers/array_checker_spec.rb +2 -0
  154. data/spec/services/mount_method/option_sanitizers/class_checker_spec.rb +2 -0
  155. data/spec/services/mount_method/option_sanitizers/hash_checker_spec.rb +2 -0
  156. data/spec/services/mount_method/option_sanitizers/string_checker_spec.rb +2 -0
  157. data/spec/services/mount_method/option_validators/provided_operations_validator_spec.rb +2 -0
  158. data/spec/services/mount_method/option_validators/skip_only_validator_spec.rb +2 -0
  159. data/spec/services/mount_method/option_validators/supported_operations_validator_spec.rb +2 -0
  160. data/spec/services/mount_method/options_validator_spec.rb +2 -0
  161. data/spec/services/resource_loader_spec.rb +84 -0
  162. data/spec/services/schema_plugin_spec.rb +28 -0
  163. data/spec/spec_helper.rb +2 -0
  164. data/spec/support/contexts/graphql_request.rb +2 -0
  165. data/spec/support/factory_bot.rb +2 -0
  166. data/spec/support/matchers/auth_headers_matcher.rb +2 -0
  167. data/spec/support/matchers/not_change_matcher.rb +2 -0
  168. data/spec/support/requests/auth_helpers.rb +2 -0
  169. data/spec/support/requests/json_helpers.rb +2 -0
  170. metadata +120 -87
  171. data/lib/graphql_devise/error_codes.rb +0 -5
  172. data/spec/support/generators/file_helpers.rb +0 -12
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OperationPreparer do
4
6
  describe '#call' do
5
7
  subject(:prepared_operations) do
6
8
  described_class.new(
7
- resource: resource,
9
+ mapping_name: mapping,
8
10
  selected_operations: selected,
9
11
  preparer: preparer,
10
12
  custom: custom,
@@ -13,11 +15,16 @@ RSpec.describe GraphqlDevise::MountMethod::OperationPreparer do
13
15
  end
14
16
 
15
17
  let(:logout_class) { Class.new(GraphQL::Schema::Resolver) }
16
- let(:resource) { 'User' }
17
- let(:selected) { { login: double(:login_default), logout: logout_class } }
18
+ let(:mapping) { :user }
18
19
  let(:preparer) { double(:preparer, call: logout_class) }
19
20
  let(:custom) { { login: double(:custom_login, graphql_name: nil) } }
20
21
  let(:additional) { { user_additional: double(:user_additional) } }
22
+ let(:selected) do
23
+ {
24
+ login: { klass: double(:login_default) },
25
+ logout:{ klass: logout_class }
26
+ }
27
+ end
21
28
 
22
29
  it 'is expected to return all provided operation keys' do
23
30
  expect(prepared_operations.keys).to contain_exactly(
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::CustomOperationPreparer do
@@ -6,7 +8,7 @@ RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::CustomOperationPr
6
8
 
7
9
  let(:login_operation) { double(:confirm_operation, graphql_name: nil) }
8
10
  let(:logout_operation) { double(:sign_up_operation, graphql_name: nil) }
9
- let(:mapping_name) { 'user' }
11
+ let(:mapping_name) { :user }
10
12
  let(:operations) { { login: login_operation, logout: logout_operation, invalid: double(:invalid) } }
11
13
  let(:selected_keys) { [:login, :logout, :sign_up, :confirm] }
12
14
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::DefaultOperationPreparer do
@@ -9,20 +11,27 @@ RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::DefaultOperationP
9
11
  let(:sign_up_operation) { double(:sign_up_operation, graphql_name: nil) }
10
12
  let(:login_operation) { double(:confirm_operation, graphql_name: nil) }
11
13
  let(:logout_operation) { double(:sign_up_operation, graphql_name: nil) }
12
- let(:mapping_name) { 'user' }
14
+ let(:mapping_name) { :user }
13
15
  let(:preparer) { double(:preparer) }
14
- let(:operations) { { login: login_operation, logout: logout_operation, sign_up: sign_up_operation, confirm: confirm_operation } }
15
16
  let(:custom_keys) { [:login, :logout] }
17
+ let(:operations) do
18
+ {
19
+ confirm: { klass: confirm_operation, authenticatable: false },
20
+ sign_up: { klass: sign_up_operation, authenticatable: true },
21
+ login: { klass: login_operation, authenticatable: true },
22
+ logout: { klass: logout_operation, authenticatable: true }
23
+ }
24
+ end
16
25
 
17
26
  before do
18
27
  allow(default_preparer).to receive(:child_class).with(confirm_operation).and_return(confirm_operation)
19
28
  allow(default_preparer).to receive(:child_class).with(sign_up_operation).and_return(sign_up_operation)
20
29
  allow(default_preparer).to receive(:child_class).with(login_operation).and_return(login_operation)
21
30
  allow(default_preparer).to receive(:child_class).with(logout_operation).and_return(logout_operation)
22
- allow(preparer).to receive(:call).with(confirm_operation).and_return(confirm_operation)
23
- allow(preparer).to receive(:call).with(sign_up_operation).and_return(sign_up_operation)
24
- allow(preparer).to receive(:call).with(login_operation).and_return(login_operation)
25
- allow(preparer).to receive(:call).with(logout_operation).and_return(logout_operation)
31
+ allow(preparer).to receive(:call).with(confirm_operation, authenticatable: false).and_return(confirm_operation)
32
+ allow(preparer).to receive(:call).with(sign_up_operation, authenticatable: true).and_return(sign_up_operation)
33
+ allow(preparer).to receive(:call).with(login_operation, authenticatable: true).and_return(login_operation)
34
+ allow(preparer).to receive(:call).with(logout_operation, authenticatable: true).and_return(logout_operation)
26
35
  end
27
36
 
28
37
  it 'returns only those operations with no custom operation provided' do
@@ -32,8 +41,8 @@ RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::DefaultOperationP
32
41
  it 'prepares default operations' do
33
42
  expect(confirm_operation).to receive(:graphql_name).with('UserConfirm')
34
43
  expect(sign_up_operation).to receive(:graphql_name).with('UserSignUp')
35
- expect(preparer).to receive(:call).with(confirm_operation)
36
- expect(preparer).to receive(:call).with(sign_up_operation)
44
+ expect(preparer).to receive(:call).with(confirm_operation, authenticatable: false)
45
+ expect(preparer).to receive(:call).with(sign_up_operation, authenticatable: true)
37
46
 
38
47
  prepared
39
48
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::GqlNameSetter do
@@ -1,16 +1,32 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::MutationFieldSetter do
4
6
  describe '#call' do
5
- subject(:prepared_operation) { described_class.new(field_type).call(operation) }
7
+ subject(:prepared_operation) { described_class.new(field_type).call(operation, authenticatable: authenticatable) }
6
8
 
7
9
  let(:operation) { double(:operation) }
8
10
  let(:field_type) { double(:type) }
9
11
 
10
- it 'sets a field for the mutation' do
11
- expect(operation).to receive(:field).with(:authenticatable, field_type, null: false)
12
+ context 'when resource is authtenticable' do
13
+ let(:authenticatable) { true }
14
+
15
+ it 'sets a field for the mutation' do
16
+ expect(operation).to receive(:field).with(:authenticatable, field_type, null: false)
17
+
18
+ prepared_operation
19
+ end
20
+ end
21
+
22
+ context 'when resource is *NOT* authtenticable' do
23
+ let(:authenticatable) { false }
24
+
25
+ it 'does *NOT* set a field for the mutation' do
26
+ expect(operation).not_to receive(:field)
12
27
 
13
- prepared_operation
28
+ prepared_operation
29
+ end
14
30
  end
15
31
  end
16
32
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::ResolverTypeSetter do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::ResourceNameSetter do
@@ -5,7 +7,7 @@ RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::ResourceNameSette
5
7
  subject(:prepared_operation) { described_class.new(mapping_name).call(operation) }
6
8
 
7
9
  let(:operation) { double(:operation) }
8
- let(:mapping_name) { 'user' }
10
+ let(:mapping_name) { :user }
9
11
 
10
12
  it 'sets a gql name to the operation' do
11
13
  expect(prepared_operation.instance_variable_get(:@resource_name)).to eq(:user)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OperationSanitizer do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OptionSanitizer do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OptionSanitizers::ArrayChecker do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OptionSanitizers::ClassChecker do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OptionSanitizers::HashChecker do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OptionSanitizers::StringChecker do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OptionValidators::ProvidedOperationsValidator do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OptionValidators::SkipOnlyValidator do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OptionValidators::SupportedOperationsValidator do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  RSpec.describe GraphqlDevise::MountMethod::OptionsValidator do
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe GraphqlDevise::ResourceLoader do
6
+ describe '#call' do
7
+ subject(:loader) { described_class.new(resource, options, routing).call(query, mutation) }
8
+
9
+ let(:query) { class_double(GraphQL::Schema::Object) }
10
+ let(:mutation) { class_double(GraphQL::Schema::Object) }
11
+ let(:routing) { false }
12
+ let(:mounted) { false }
13
+ let(:resource) { 'User' }
14
+ let(:options) { { only: [:login, :confirm_account] } }
15
+
16
+ before do
17
+ allow(GraphqlDevise).to receive(:add_mapping).with(:user, resource)
18
+ allow(GraphqlDevise).to receive(:resource_mounted?).with(:user).and_return(mounted)
19
+ allow(GraphqlDevise).to receive(:mount_resource).with(:user)
20
+ end
21
+
22
+ it 'loads operations into the provided types' do
23
+ expect(query).to receive(:field).with(:user_confirm_account, resolver: instance_of(Class), authenticate: false)
24
+ expect(mutation).to receive(:field).with(:user_login, mutation: instance_of(Class), authenticate: false)
25
+ expect(GraphqlDevise).to receive(:add_mapping).with(:user, resource)
26
+ expect(GraphqlDevise).not_to receive(:mount_resource)
27
+
28
+ returned = loader
29
+
30
+ expect(returned).to be_a(Struct)
31
+ end
32
+
33
+ context 'when mutation is nil' do
34
+ let(:mutation) { nil }
35
+
36
+ it 'raises an error' do
37
+ expect { loader }.to raise_error(
38
+ GraphqlDevise::Error,
39
+ 'You need to provide a mutation type unless all mutations are skipped'
40
+ )
41
+ end
42
+ end
43
+
44
+ context 'when query is nil' do
45
+ let(:query) { nil }
46
+
47
+ before { allow(mutation).to receive(:field) }
48
+
49
+ it 'raises an error' do
50
+ expect { loader }.to raise_error(
51
+ GraphqlDevise::Error,
52
+ 'You need to provide a query type unless all queries are skipped'
53
+ )
54
+ end
55
+ end
56
+
57
+ context 'when invoked from router' do
58
+ let(:routing) { true }
59
+
60
+ before do
61
+ allow(query).to receive(:field)
62
+ allow(mutation).to receive(:field)
63
+ end
64
+
65
+ it 'adds mappings' do
66
+ expect(GraphqlDevise).to receive(:add_mapping).with(:user, resource)
67
+ expect(GraphqlDevise).to receive(:mount_resource).with(:user)
68
+
69
+ loader
70
+ end
71
+
72
+ context 'when resource was already mounted' do
73
+ before { allow(GraphqlDevise).to receive(:resource_mounted?).with(:user).and_return(true) }
74
+
75
+ it 'skips schema loading' do
76
+ expect(query).not_to receive(:field)
77
+ expect(mutation).not_to receive(:field)
78
+ expect(GraphqlDevise).not_to receive(:add_mapping).with(:user, resource)
79
+ expect(GraphqlDevise).not_to receive(:mount_resource)
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe GraphqlDevise::SchemaPlugin do
6
+ describe '#call' do
7
+ subject(:plugin) { described_class.new(query: query, mutation: mutation, resource_loaders: loaders) }
8
+
9
+ let(:query) { instance_double(GraphQL::Schema::Object) }
10
+ let(:mutation) { instance_double(GraphQL::Schema::Object) }
11
+
12
+ context 'when loaders are not provided' do
13
+ let(:loaders) { [] }
14
+
15
+ it 'does not fail' do
16
+ expect { plugin }.not_to raise_error
17
+ end
18
+ end
19
+
20
+ context 'when a loaders is not an instance of loader' do
21
+ let(:loaders) { ['not a loader instance'] }
22
+
23
+ it 'raises an error' do
24
+ expect { plugin }.to raise_error(GraphqlDevise::Error, 'Invalid resource loader instance')
25
+ end
26
+ end
27
+ end
28
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  if ENV['CI'] && !ENV['SKIP_COVERALLS']
2
4
  require 'simplecov'
3
5
  require 'coveralls'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec.shared_context 'with graphql query request' do
2
4
  let(:headers) { {} }
3
5
  let(:variables) { {} }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec.configure do |config|
2
4
  config.include FactoryBot::Syntax::Methods
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :include_auth_headers do
2
4
  match do |response|
3
5
  auth_headers = %w[uid access-token client].map { |key| response.headers[key] }
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define_negated_matcher :not_change, :change
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Requests
2
4
  module AuthHelpers
3
5
  def auth_headers_for(user)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Requests
2
4
  module JsonHelpers
3
5
  def json_response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql_devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.4
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Celi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-05-23 00:00:00.000000000 Z
12
+ date: 2020-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: devise_token_auth
@@ -18,6 +18,9 @@ dependencies:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 0.1.43
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '2.0'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -25,6 +28,9 @@ dependencies:
25
28
  - - ">="
26
29
  - !ruby/object:Gem::Version
27
30
  version: 0.1.43
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: graphql
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -32,6 +38,9 @@ dependencies:
32
38
  - - ">="
33
39
  - !ruby/object:Gem::Version
34
40
  version: '1.8'
41
+ - - "<"
42
+ - !ruby/object:Gem::Version
43
+ version: 1.12.0
35
44
  type: :runtime
36
45
  prerelease: false
37
46
  version_requirements: !ruby/object:Gem::Requirement
@@ -39,6 +48,9 @@ dependencies:
39
48
  - - ">="
40
49
  - !ruby/object:Gem::Version
41
50
  version: '1.8'
51
+ - - "<"
52
+ - !ruby/object:Gem::Version
53
+ version: 1.12.0
42
54
  - !ruby/object:Gem::Dependency
43
55
  name: rails
44
56
  requirement: !ruby/object:Gem::Requirement
@@ -46,6 +58,9 @@ dependencies:
46
58
  - - ">="
47
59
  - !ruby/object:Gem::Version
48
60
  version: '4.2'
61
+ - - "<"
62
+ - !ruby/object:Gem::Version
63
+ version: '6.2'
49
64
  type: :runtime
50
65
  prerelease: false
51
66
  version_requirements: !ruby/object:Gem::Requirement
@@ -53,6 +68,9 @@ dependencies:
53
68
  - - ">="
54
69
  - !ruby/object:Gem::Version
55
70
  version: '4.2'
71
+ - - "<"
72
+ - !ruby/object:Gem::Version
73
+ version: '6.2'
56
74
  - !ruby/object:Gem::Dependency
57
75
  name: appraisal
58
76
  requirement: !ruby/object:Gem::Requirement
@@ -290,9 +308,13 @@ files:
290
308
  - lib/graphql_devise/concerns/controller_methods.rb
291
309
  - lib/graphql_devise/default_operations/mutations.rb
292
310
  - lib/graphql_devise/default_operations/resolvers.rb
293
- - lib/graphql_devise/detailed_user_error.rb
294
311
  - lib/graphql_devise/engine.rb
295
- - lib/graphql_devise/error_codes.rb
312
+ - lib/graphql_devise/errors/authentication_error.rb
313
+ - lib/graphql_devise/errors/detailed_user_error.rb
314
+ - lib/graphql_devise/errors/error_codes.rb
315
+ - lib/graphql_devise/errors/execution_error.rb
316
+ - lib/graphql_devise/errors/user_error.rb
317
+ - lib/graphql_devise/model/with_email_updater.rb
296
318
  - lib/graphql_devise/mount_method/operation_preparer.rb
297
319
  - lib/graphql_devise/mount_method/operation_preparers/custom_operation_preparer.rb
298
320
  - lib/graphql_devise/mount_method/operation_preparers/default_operation_preparer.rb
@@ -323,12 +345,13 @@ files:
323
345
  - lib/graphql_devise/resolvers/check_password_token.rb
324
346
  - lib/graphql_devise/resolvers/confirm_account.rb
325
347
  - lib/graphql_devise/resolvers/dummy.rb
348
+ - lib/graphql_devise/resource_loader.rb
326
349
  - lib/graphql_devise/schema.rb
350
+ - lib/graphql_devise/schema_plugin.rb
327
351
  - lib/graphql_devise/types/authenticatable_type.rb
328
352
  - lib/graphql_devise/types/credential_type.rb
329
353
  - lib/graphql_devise/types/mutation_type.rb
330
354
  - lib/graphql_devise/types/query_type.rb
331
- - lib/graphql_devise/user_error.rb
332
355
  - lib/graphql_devise/version.rb
333
356
  - spec/dummy/README.md
334
357
  - spec/dummy/Rakefile
@@ -336,9 +359,11 @@ files:
336
359
  - spec/dummy/app/controllers/api/v1/graphql_controller.rb
337
360
  - spec/dummy/app/controllers/application_controller.rb
338
361
  - spec/dummy/app/graphql/dummy_schema.rb
362
+ - spec/dummy/app/graphql/interpreter_schema.rb
339
363
  - spec/dummy/app/graphql/mutations/login.rb
340
364
  - spec/dummy/app/graphql/mutations/register_confirmed_user.rb
341
365
  - spec/dummy/app/graphql/mutations/sign_up.rb
366
+ - spec/dummy/app/graphql/mutations/update_user.rb
342
367
  - spec/dummy/app/graphql/resolvers/public_user.rb
343
368
  - spec/dummy/app/graphql/resolvers/user_show.rb
344
369
  - spec/dummy/app/graphql/types/base_object.rb
@@ -351,6 +376,7 @@ files:
351
376
  - spec/dummy/app/models/admin.rb
352
377
  - spec/dummy/app/models/application_record.rb
353
378
  - spec/dummy/app/models/guest.rb
379
+ - spec/dummy/app/models/schema_user.rb
354
380
  - spec/dummy/app/models/user.rb
355
381
  - spec/dummy/app/models/users.rb
356
382
  - spec/dummy/app/models/users/customer.rb
@@ -384,26 +410,27 @@ files:
384
410
  - spec/dummy/config/routes.rb
385
411
  - spec/dummy/config/secrets.yml
386
412
  - spec/dummy/config/spring.rb
387
- - spec/dummy/db/development.sqlite3
388
413
  - spec/dummy/db/migrate/20190815114303_create_users.rb
389
414
  - spec/dummy/db/migrate/20190824215150_add_auth_available_to_users.rb
390
415
  - spec/dummy/db/migrate/20190916012505_create_admins.rb
391
416
  - spec/dummy/db/migrate/20191013213045_create_guests.rb
392
417
  - spec/dummy/db/migrate/20200321121807_create_users_customers.rb
418
+ - spec/dummy/db/migrate/20200621182414_remove_uncofirmed_email_from_admins.rb
419
+ - spec/dummy/db/migrate/20200623003142_create_schema_users.rb
393
420
  - spec/dummy/db/schema.rb
394
421
  - spec/dummy/db/seeds.rb
395
- - spec/dummy/db/test.sqlite3
396
- - spec/dummy/log/development.log
397
- - spec/dummy/log/test.log
398
422
  - spec/dummy/public/robots.txt
399
423
  - spec/factories/admins.rb
400
424
  - spec/factories/guests.rb
425
+ - spec/factories/schema_users.rb
401
426
  - spec/factories/users.rb
402
427
  - spec/factories/users_customers.rb
403
428
  - spec/generators/graphql_devise/install_generator_spec.rb
429
+ - spec/graphql_devise/model/with_email_updater_spec.rb
404
430
  - spec/graphql_devise_spec.rb
405
431
  - spec/models/user_spec.rb
406
432
  - spec/rails_helper.rb
433
+ - spec/requests/graphql_controller_spec.rb
407
434
  - spec/requests/mutations/additional_mutations_spec.rb
408
435
  - spec/requests/mutations/additional_queries_spec.rb
409
436
  - spec/requests/mutations/login_spec.rb
@@ -432,10 +459,11 @@ files:
432
459
  - spec/services/mount_method/option_validators/skip_only_validator_spec.rb
433
460
  - spec/services/mount_method/option_validators/supported_operations_validator_spec.rb
434
461
  - spec/services/mount_method/options_validator_spec.rb
462
+ - spec/services/resource_loader_spec.rb
463
+ - spec/services/schema_plugin_spec.rb
435
464
  - spec/spec_helper.rb
436
465
  - spec/support/contexts/graphql_request.rb
437
466
  - spec/support/factory_bot.rb
438
- - spec/support/generators/file_helpers.rb
439
467
  - spec/support/matchers/auth_headers_matcher.rb
440
468
  - spec/support/matchers/not_change_matcher.rb
441
469
  - spec/support/requests/auth_helpers.rb
@@ -461,118 +489,123 @@ required_rubygems_version: !ruby/object:Gem::Requirement
461
489
  - !ruby/object:Gem::Version
462
490
  version: '0'
463
491
  requirements: []
464
- rubygems_version: 3.0.6
492
+ rubygems_version: 3.1.4
465
493
  signing_key:
466
494
  specification_version: 4
467
495
  summary: GraphQL queries and mutations on top of devise_token_auth
468
496
  test_files:
469
- - spec/spec_helper.rb
470
- - spec/dummy/app/mailers/application_mailer.rb
471
- - spec/dummy/app/models/guest.rb
472
- - spec/dummy/app/models/admin.rb
473
- - spec/dummy/app/models/users/customer.rb
474
- - spec/dummy/app/models/users.rb
475
- - spec/dummy/app/models/application_record.rb
476
- - spec/dummy/app/models/user.rb
477
- - spec/dummy/app/graphql/types/custom_admin_type.rb
478
- - spec/dummy/app/graphql/types/mutation_type.rb
479
- - spec/dummy/app/graphql/types/query_type.rb
480
- - spec/dummy/app/graphql/types/base_object.rb
481
- - spec/dummy/app/graphql/types/user_type.rb
482
- - spec/dummy/app/graphql/mutations/register_confirmed_user.rb
497
+ - spec/dummy/README.md
498
+ - spec/dummy/Rakefile
499
+ - spec/dummy/app/assets/config/manifest.js
500
+ - spec/dummy/app/controllers/api/v1/graphql_controller.rb
501
+ - spec/dummy/app/controllers/application_controller.rb
502
+ - spec/dummy/app/graphql/dummy_schema.rb
503
+ - spec/dummy/app/graphql/interpreter_schema.rb
483
504
  - spec/dummy/app/graphql/mutations/login.rb
505
+ - spec/dummy/app/graphql/mutations/register_confirmed_user.rb
484
506
  - spec/dummy/app/graphql/mutations/sign_up.rb
507
+ - spec/dummy/app/graphql/mutations/update_user.rb
485
508
  - spec/dummy/app/graphql/resolvers/public_user.rb
486
509
  - spec/dummy/app/graphql/resolvers/user_show.rb
487
- - spec/dummy/app/graphql/dummy_schema.rb
510
+ - spec/dummy/app/graphql/types/base_object.rb
511
+ - spec/dummy/app/graphql/types/custom_admin_type.rb
512
+ - spec/dummy/app/graphql/types/mutation_type.rb
513
+ - spec/dummy/app/graphql/types/query_type.rb
514
+ - spec/dummy/app/graphql/types/user_type.rb
488
515
  - spec/dummy/app/jobs/application_job.rb
489
- - spec/dummy/app/controllers/application_controller.rb
490
- - spec/dummy/app/controllers/api/v1/graphql_controller.rb
516
+ - spec/dummy/app/mailers/application_mailer.rb
517
+ - spec/dummy/app/models/admin.rb
518
+ - spec/dummy/app/models/application_record.rb
519
+ - spec/dummy/app/models/guest.rb
520
+ - spec/dummy/app/models/schema_user.rb
521
+ - spec/dummy/app/models/user.rb
522
+ - spec/dummy/app/models/users.rb
523
+ - spec/dummy/app/models/users/customer.rb
491
524
  - spec/dummy/app/views/layouts/mailer.html.erb
492
525
  - spec/dummy/app/views/layouts/mailer.text.erb
493
- - spec/dummy/app/assets/config/manifest.js
494
- - spec/dummy/bin/update
495
- - spec/dummy/bin/rake
496
- - spec/dummy/bin/setup
497
526
  - spec/dummy/bin/bundle
498
527
  - spec/dummy/bin/rails
499
- - spec/dummy/config/secrets.yml
500
- - spec/dummy/config/routes.rb
501
- - spec/dummy/config/environments/production.rb
502
- - spec/dummy/config/environments/development.rb
503
- - spec/dummy/config/environments/test.rb
504
- - spec/dummy/config/spring.rb
505
- - spec/dummy/config/master.key
506
- - spec/dummy/config/environment.rb
528
+ - spec/dummy/bin/rake
529
+ - spec/dummy/bin/setup
530
+ - spec/dummy/bin/update
531
+ - spec/dummy/config.ru
507
532
  - spec/dummy/config/application.rb
508
- - spec/dummy/config/puma.rb
509
533
  - spec/dummy/config/credentials.yml.enc
510
534
  - spec/dummy/config/database.yml
535
+ - spec/dummy/config/environment.rb
536
+ - spec/dummy/config/environments/development.rb
537
+ - spec/dummy/config/environments/production.rb
538
+ - spec/dummy/config/environments/test.rb
511
539
  - spec/dummy/config/initializers/application_controller_renderer.rb
512
540
  - spec/dummy/config/initializers/backtrace_silencers.rb
541
+ - spec/dummy/config/initializers/cors.rb
542
+ - spec/dummy/config/initializers/devise.rb
513
543
  - spec/dummy/config/initializers/devise_token_auth.rb
514
- - spec/dummy/config/initializers/mime_types.rb
515
544
  - spec/dummy/config/initializers/filter_parameter_logging.rb
516
- - spec/dummy/config/initializers/wrap_parameters.rb
517
545
  - spec/dummy/config/initializers/i18n.rb
518
- - spec/dummy/config/initializers/devise.rb
519
546
  - spec/dummy/config/initializers/inflections.rb
520
- - spec/dummy/config/initializers/cors.rb
521
- - spec/dummy/config.ru
522
- - spec/dummy/README.md
523
- - spec/dummy/Rakefile
524
- - spec/dummy/public/robots.txt
525
- - spec/dummy/db/schema.rb
526
- - spec/dummy/db/seeds.rb
527
- - spec/dummy/db/test.sqlite3
547
+ - spec/dummy/config/initializers/mime_types.rb
548
+ - spec/dummy/config/initializers/wrap_parameters.rb
549
+ - spec/dummy/config/master.key
550
+ - spec/dummy/config/puma.rb
551
+ - spec/dummy/config/routes.rb
552
+ - spec/dummy/config/secrets.yml
553
+ - spec/dummy/config/spring.rb
554
+ - spec/dummy/db/migrate/20190815114303_create_users.rb
555
+ - spec/dummy/db/migrate/20190824215150_add_auth_available_to_users.rb
528
556
  - spec/dummy/db/migrate/20190916012505_create_admins.rb
529
557
  - spec/dummy/db/migrate/20191013213045_create_guests.rb
530
558
  - spec/dummy/db/migrate/20200321121807_create_users_customers.rb
531
- - spec/dummy/db/migrate/20190815114303_create_users.rb
532
- - spec/dummy/db/migrate/20190824215150_add_auth_available_to_users.rb
533
- - spec/dummy/db/development.sqlite3
534
- - spec/dummy/log/test.log
535
- - spec/dummy/log/development.log
559
+ - spec/dummy/db/migrate/20200621182414_remove_uncofirmed_email_from_admins.rb
560
+ - spec/dummy/db/migrate/20200623003142_create_schema_users.rb
561
+ - spec/dummy/db/schema.rb
562
+ - spec/dummy/db/seeds.rb
563
+ - spec/dummy/public/robots.txt
564
+ - spec/factories/admins.rb
565
+ - spec/factories/guests.rb
566
+ - spec/factories/schema_users.rb
567
+ - spec/factories/users.rb
568
+ - spec/factories/users_customers.rb
569
+ - spec/generators/graphql_devise/install_generator_spec.rb
570
+ - spec/graphql_devise/model/with_email_updater_spec.rb
536
571
  - spec/graphql_devise_spec.rb
537
572
  - spec/models/user_spec.rb
538
- - spec/requests/user_controller_spec.rb
573
+ - spec/rails_helper.rb
574
+ - spec/requests/graphql_controller_spec.rb
575
+ - spec/requests/mutations/additional_mutations_spec.rb
576
+ - spec/requests/mutations/additional_queries_spec.rb
539
577
  - spec/requests/mutations/login_spec.rb
540
578
  - spec/requests/mutations/logout_spec.rb
579
+ - spec/requests/mutations/resend_confirmation_spec.rb
541
580
  - spec/requests/mutations/send_password_reset_spec.rb
542
- - spec/requests/mutations/update_password_spec.rb
543
- - spec/requests/mutations/additional_mutations_spec.rb
544
- - spec/requests/mutations/additional_queries_spec.rb
545
581
  - spec/requests/mutations/sign_up_spec.rb
546
- - spec/requests/mutations/resend_confirmation_spec.rb
547
- - spec/requests/queries/confirm_account_spec.rb
582
+ - spec/requests/mutations/update_password_spec.rb
548
583
  - spec/requests/queries/check_password_token_spec.rb
549
- - spec/support/factory_bot.rb
550
- - spec/support/contexts/graphql_request.rb
551
- - spec/support/requests/auth_helpers.rb
552
- - spec/support/requests/json_helpers.rb
553
- - spec/support/generators/file_helpers.rb
554
- - spec/support/matchers/not_change_matcher.rb
555
- - spec/support/matchers/auth_headers_matcher.rb
556
- - spec/factories/admins.rb
557
- - spec/factories/users.rb
558
- - spec/factories/guests.rb
559
- - spec/factories/users_customers.rb
560
- - spec/generators/graphql_devise/install_generator_spec.rb
561
- - spec/rails_helper.rb
562
- - spec/services/mount_method/option_sanitizers/class_checker_spec.rb
563
- - spec/services/mount_method/option_sanitizers/array_checker_spec.rb
564
- - spec/services/mount_method/option_sanitizers/hash_checker_spec.rb
565
- - spec/services/mount_method/option_sanitizers/string_checker_spec.rb
566
- - spec/services/mount_method/option_sanitizer_spec.rb
567
- - spec/services/mount_method/options_validator_spec.rb
584
+ - spec/requests/queries/confirm_account_spec.rb
585
+ - spec/requests/user_controller_spec.rb
568
586
  - spec/services/mount_method/operation_preparer_spec.rb
569
- - spec/services/mount_method/operation_preparers/gql_name_setter_spec.rb
587
+ - spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb
570
588
  - spec/services/mount_method/operation_preparers/default_operation_preparer_spec.rb
589
+ - spec/services/mount_method/operation_preparers/gql_name_setter_spec.rb
590
+ - spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb
571
591
  - spec/services/mount_method/operation_preparers/resolver_type_setter_spec.rb
572
592
  - spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
573
- - spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb
574
- - spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb
575
- - spec/services/mount_method/option_validators/supported_operations_validator_spec.rb
593
+ - spec/services/mount_method/operation_sanitizer_spec.rb
594
+ - spec/services/mount_method/option_sanitizer_spec.rb
595
+ - spec/services/mount_method/option_sanitizers/array_checker_spec.rb
596
+ - spec/services/mount_method/option_sanitizers/class_checker_spec.rb
597
+ - spec/services/mount_method/option_sanitizers/hash_checker_spec.rb
598
+ - spec/services/mount_method/option_sanitizers/string_checker_spec.rb
576
599
  - spec/services/mount_method/option_validators/provided_operations_validator_spec.rb
577
600
  - spec/services/mount_method/option_validators/skip_only_validator_spec.rb
578
- - spec/services/mount_method/operation_sanitizer_spec.rb
601
+ - spec/services/mount_method/option_validators/supported_operations_validator_spec.rb
602
+ - spec/services/mount_method/options_validator_spec.rb
603
+ - spec/services/resource_loader_spec.rb
604
+ - spec/services/schema_plugin_spec.rb
605
+ - spec/spec_helper.rb
606
+ - spec/support/contexts/graphql_request.rb
607
+ - spec/support/factory_bot.rb
608
+ - spec/support/matchers/auth_headers_matcher.rb
609
+ - spec/support/matchers/not_change_matcher.rb
610
+ - spec/support/requests/auth_helpers.rb
611
+ - spec/support/requests/json_helpers.rb