graphql_devise 0.11.1 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.rspec +1 -0
  4. data/.travis.yml +11 -3
  5. data/CHANGELOG.md +43 -0
  6. data/README.md +191 -32
  7. data/app/controllers/graphql_devise/application_controller.rb +4 -1
  8. data/app/controllers/graphql_devise/concerns/set_user_by_token.rb +23 -0
  9. data/app/controllers/graphql_devise/graphql_controller.rb +2 -0
  10. data/app/helpers/graphql_devise/mailer_helper.rb +2 -2
  11. data/config/locales/en.yml +1 -0
  12. data/config/routes.rb +14 -7
  13. data/graphql_devise.gemspec +6 -4
  14. data/lib/generators/graphql_devise/install_generator.rb +63 -30
  15. data/lib/graphql_devise.rb +39 -6
  16. data/lib/graphql_devise/default_operations/mutations.rb +6 -6
  17. data/lib/graphql_devise/default_operations/resolvers.rb +2 -2
  18. data/lib/graphql_devise/errors/authentication_error.rb +7 -0
  19. data/lib/graphql_devise/{detailed_user_error.rb → errors/detailed_user_error.rb} +1 -1
  20. data/lib/graphql_devise/errors/error_codes.rb +6 -0
  21. data/lib/graphql_devise/errors/execution_error.rb +4 -0
  22. data/lib/graphql_devise/{user_error.rb → errors/user_error.rb} +1 -1
  23. data/lib/graphql_devise/mount_method/operation_preparer.rb +2 -2
  24. data/lib/graphql_devise/mount_method/operation_preparers/default_operation_preparer.rb +6 -2
  25. data/lib/graphql_devise/mount_method/operation_preparers/gql_name_setter.rb +1 -1
  26. data/lib/graphql_devise/mount_method/operation_preparers/mutation_field_setter.rb +3 -2
  27. data/lib/graphql_devise/mount_method/operation_preparers/resolver_type_setter.rb +1 -1
  28. data/lib/graphql_devise/mount_method/operation_preparers/resource_name_setter.rb +2 -2
  29. data/lib/graphql_devise/mutations/resend_confirmation.rb +1 -4
  30. data/lib/graphql_devise/mutations/send_password_reset.rb +3 -1
  31. data/lib/graphql_devise/mutations/sign_up.rb +1 -5
  32. data/lib/graphql_devise/rails/routes.rb +5 -67
  33. data/lib/graphql_devise/resource_loader.rb +87 -0
  34. data/lib/graphql_devise/schema_plugin.rb +87 -0
  35. data/lib/graphql_devise/version.rb +1 -1
  36. data/spec/dummy/app/controllers/api/v1/graphql_controller.rb +11 -2
  37. data/spec/dummy/app/controllers/application_controller.rb +1 -0
  38. data/spec/dummy/app/graphql/dummy_schema.rb +9 -0
  39. data/spec/dummy/app/graphql/interpreter_schema.rb +9 -0
  40. data/spec/dummy/app/graphql/types/mutation_type.rb +1 -1
  41. data/spec/dummy/app/graphql/types/query_type.rb +10 -0
  42. data/spec/dummy/config/environments/test.rb +1 -1
  43. data/spec/dummy/config/routes.rb +1 -0
  44. data/spec/generators/graphql_devise/install_generator_spec.rb +62 -30
  45. data/spec/rails_helper.rb +4 -1
  46. data/spec/requests/graphql_controller_spec.rb +80 -0
  47. data/spec/requests/mutations/resend_confirmation_spec.rb +2 -14
  48. data/spec/requests/mutations/send_password_reset_spec.rb +8 -3
  49. data/spec/requests/user_controller_spec.rb +180 -24
  50. data/spec/services/mount_method/operation_preparer_spec.rb +8 -3
  51. data/spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb +1 -1
  52. data/spec/services/mount_method/operation_preparers/default_operation_preparer_spec.rb +15 -8
  53. data/spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb +18 -4
  54. data/spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb +1 -1
  55. data/spec/services/resource_loader_spec.rb +82 -0
  56. data/spec/services/schema_plugin_spec.rb +26 -0
  57. data/spec/spec_helper.rb +1 -1
  58. metadata +107 -89
  59. data/lib/graphql_devise/error_codes.rb +0 -5
  60. data/spec/support/generators/file_helpers.rb +0 -12
@@ -2,15 +2,29 @@ require 'spec_helper'
2
2
 
3
3
  RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::MutationFieldSetter do
4
4
  describe '#call' do
5
- subject(:prepared_operation) { described_class.new(field_type).call(operation) }
5
+ subject(:prepared_operation) { described_class.new(field_type).call(operation, authenticatable: authenticatable) }
6
6
 
7
7
  let(:operation) { double(:operation) }
8
8
  let(:field_type) { double(:type) }
9
9
 
10
- it 'sets a field for the mutation' do
11
- expect(operation).to receive(:field).with(:authenticatable, field_type, null: false)
10
+ context 'when resource is authtenticable' do
11
+ let(:authenticatable) { true }
12
12
 
13
- prepared_operation
13
+ it 'sets a field for the mutation' do
14
+ expect(operation).to receive(:field).with(:authenticatable, field_type, null: false)
15
+
16
+ prepared_operation
17
+ end
18
+ end
19
+
20
+ context 'when resource is *NOT* authtenticable' do
21
+ let(:authenticatable) { false }
22
+
23
+ it 'does *NOT* set a field for the mutation' do
24
+ expect(operation).not_to receive(:field)
25
+
26
+ prepared_operation
27
+ end
14
28
  end
15
29
  end
16
30
  end
@@ -5,7 +5,7 @@ RSpec.describe GraphqlDevise::MountMethod::OperationPreparers::ResourceNameSette
5
5
  subject(:prepared_operation) { described_class.new(mapping_name).call(operation) }
6
6
 
7
7
  let(:operation) { double(:operation) }
8
- let(:mapping_name) { 'user' }
8
+ let(:mapping_name) { :user }
9
9
 
10
10
  it 'sets a gql name to the operation' do
11
11
  expect(prepared_operation.instance_variable_get(:@resource_name)).to eq(:user)
@@ -0,0 +1,82 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe GraphqlDevise::ResourceLoader do
4
+ describe '#call' do
5
+ subject(:loader) { described_class.new(resource, options, routing).call(query, mutation) }
6
+
7
+ let(:query) { class_double(GraphQL::Schema::Object) }
8
+ let(:mutation) { class_double(GraphQL::Schema::Object) }
9
+ let(:routing) { false }
10
+ let(:mounted) { false }
11
+ let(:resource) { 'User' }
12
+ let(:options) { { only: [:login, :confirm_account] } }
13
+
14
+ before do
15
+ allow(GraphqlDevise).to receive(:add_mapping).with(:user, resource)
16
+ allow(GraphqlDevise).to receive(:resource_mounted?).with(:user).and_return(mounted)
17
+ allow(GraphqlDevise).to receive(:mount_resource).with(:user)
18
+ end
19
+
20
+ it 'loads operations into the provided types' do
21
+ expect(query).to receive(:field).with(:user_confirm_account, resolver: instance_of(Class), authenticate: false)
22
+ expect(mutation).to receive(:field).with(:user_login, mutation: instance_of(Class), authenticate: false)
23
+ expect(GraphqlDevise).to receive(:add_mapping).with(:user, resource)
24
+ expect(GraphqlDevise).not_to receive(:mount_resource)
25
+
26
+ returned = loader
27
+
28
+ expect(returned).to be_a(Struct)
29
+ end
30
+
31
+ context 'when mutation is nil' do
32
+ let(:mutation) { nil }
33
+
34
+ it 'raises an error' do
35
+ expect { loader }.to raise_error(
36
+ GraphqlDevise::Error,
37
+ 'You need to provide a mutation type unless all mutations are skipped'
38
+ )
39
+ end
40
+ end
41
+
42
+ context 'when query is nil' do
43
+ let(:query) { nil }
44
+
45
+ before { allow(mutation).to receive(:field) }
46
+
47
+ it 'raises an error' do
48
+ expect { loader }.to raise_error(
49
+ GraphqlDevise::Error,
50
+ 'You need to provide a query type unless all queries are skipped'
51
+ )
52
+ end
53
+ end
54
+
55
+ context 'when invoked from router' do
56
+ let(:routing) { true }
57
+
58
+ before do
59
+ allow(query).to receive(:field)
60
+ allow(mutation).to receive(:field)
61
+ end
62
+
63
+ it 'adds mappings' do
64
+ expect(GraphqlDevise).to receive(:add_mapping).with(:user, resource)
65
+ expect(GraphqlDevise).to receive(:mount_resource).with(:user)
66
+
67
+ loader
68
+ end
69
+
70
+ context 'when resource was already mounted' do
71
+ before { allow(GraphqlDevise).to receive(:resource_mounted?).with(:user).and_return(true) }
72
+
73
+ it 'skips schema loading' do
74
+ expect(query).not_to receive(:field)
75
+ expect(mutation).not_to receive(:field)
76
+ expect(GraphqlDevise).not_to receive(:add_mapping).with(:user, resource)
77
+ expect(GraphqlDevise).not_to receive(:mount_resource)
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,26 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe GraphqlDevise::SchemaPlugin do
4
+ describe '#call' do
5
+ subject(:plugin) { described_class.new(query: query, mutation: mutation, resource_loaders: loaders) }
6
+
7
+ let(:query) { instance_double(GraphQL::Schema::Object) }
8
+ let(:mutation) { instance_double(GraphQL::Schema::Object) }
9
+
10
+ context 'when loaders are not provided' do
11
+ let(:loaders) { [] }
12
+
13
+ it 'does not fail' do
14
+ expect { plugin }.not_to raise_error
15
+ end
16
+ end
17
+
18
+ context 'when a loaders is not an instance of loader' do
19
+ let(:loaders) { ['not a loader instance'] }
20
+
21
+ it 'raises an error' do
22
+ expect { plugin }.to raise_error(GraphqlDevise::Error, 'Invalid resource loader instance')
23
+ end
24
+ end
25
+ end
26
+ end
@@ -4,7 +4,7 @@ if ENV['CI'] && !ENV['SKIP_COVERALLS']
4
4
 
5
5
  SimpleCov.formatter = Coveralls::SimpleCov::Formatter
6
6
  SimpleCov.start 'rails' do
7
- add_filter ['spec', 'lib/generators']
7
+ add_filter ['spec']
8
8
  end
9
9
  end
10
10
 
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.1
4
+ version: 0.12.1
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-05 00:00:00.000000000 Z
12
+ date: 2020-06-12 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.11.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.11.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,12 @@ 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
296
317
  - lib/graphql_devise/mount_method/operation_preparer.rb
297
318
  - lib/graphql_devise/mount_method/operation_preparers/custom_operation_preparer.rb
298
319
  - lib/graphql_devise/mount_method/operation_preparers/default_operation_preparer.rb
@@ -323,12 +344,13 @@ files:
323
344
  - lib/graphql_devise/resolvers/check_password_token.rb
324
345
  - lib/graphql_devise/resolvers/confirm_account.rb
325
346
  - lib/graphql_devise/resolvers/dummy.rb
347
+ - lib/graphql_devise/resource_loader.rb
326
348
  - lib/graphql_devise/schema.rb
349
+ - lib/graphql_devise/schema_plugin.rb
327
350
  - lib/graphql_devise/types/authenticatable_type.rb
328
351
  - lib/graphql_devise/types/credential_type.rb
329
352
  - lib/graphql_devise/types/mutation_type.rb
330
353
  - lib/graphql_devise/types/query_type.rb
331
- - lib/graphql_devise/user_error.rb
332
354
  - lib/graphql_devise/version.rb
333
355
  - spec/dummy/README.md
334
356
  - spec/dummy/Rakefile
@@ -336,6 +358,7 @@ files:
336
358
  - spec/dummy/app/controllers/api/v1/graphql_controller.rb
337
359
  - spec/dummy/app/controllers/application_controller.rb
338
360
  - spec/dummy/app/graphql/dummy_schema.rb
361
+ - spec/dummy/app/graphql/interpreter_schema.rb
339
362
  - spec/dummy/app/graphql/mutations/login.rb
340
363
  - spec/dummy/app/graphql/mutations/register_confirmed_user.rb
341
364
  - spec/dummy/app/graphql/mutations/sign_up.rb
@@ -384,7 +407,6 @@ files:
384
407
  - spec/dummy/config/routes.rb
385
408
  - spec/dummy/config/secrets.yml
386
409
  - spec/dummy/config/spring.rb
387
- - spec/dummy/db/development.sqlite3
388
410
  - spec/dummy/db/migrate/20190815114303_create_users.rb
389
411
  - spec/dummy/db/migrate/20190824215150_add_auth_available_to_users.rb
390
412
  - spec/dummy/db/migrate/20190916012505_create_admins.rb
@@ -392,11 +414,7 @@ files:
392
414
  - spec/dummy/db/migrate/20200321121807_create_users_customers.rb
393
415
  - spec/dummy/db/schema.rb
394
416
  - spec/dummy/db/seeds.rb
395
- - spec/dummy/db/test.sqlite3
396
- - spec/dummy/log/development.log
397
- - spec/dummy/log/test.log
398
417
  - spec/dummy/public/robots.txt
399
- - spec/dummy/tmp/development_secret.txt
400
418
  - spec/factories/admins.rb
401
419
  - spec/factories/guests.rb
402
420
  - spec/factories/users.rb
@@ -405,6 +423,7 @@ files:
405
423
  - spec/graphql_devise_spec.rb
406
424
  - spec/models/user_spec.rb
407
425
  - spec/rails_helper.rb
426
+ - spec/requests/graphql_controller_spec.rb
408
427
  - spec/requests/mutations/additional_mutations_spec.rb
409
428
  - spec/requests/mutations/additional_queries_spec.rb
410
429
  - spec/requests/mutations/login_spec.rb
@@ -433,10 +452,11 @@ files:
433
452
  - spec/services/mount_method/option_validators/skip_only_validator_spec.rb
434
453
  - spec/services/mount_method/option_validators/supported_operations_validator_spec.rb
435
454
  - spec/services/mount_method/options_validator_spec.rb
455
+ - spec/services/resource_loader_spec.rb
456
+ - spec/services/schema_plugin_spec.rb
436
457
  - spec/spec_helper.rb
437
458
  - spec/support/contexts/graphql_request.rb
438
459
  - spec/support/factory_bot.rb
439
- - spec/support/generators/file_helpers.rb
440
460
  - spec/support/matchers/auth_headers_matcher.rb
441
461
  - spec/support/matchers/not_change_matcher.rb
442
462
  - spec/support/requests/auth_helpers.rb
@@ -462,119 +482,117 @@ required_rubygems_version: !ruby/object:Gem::Requirement
462
482
  - !ruby/object:Gem::Version
463
483
  version: '0'
464
484
  requirements: []
465
- rubygems_version: 3.0.6
485
+ rubygems_version: 3.1.4
466
486
  signing_key:
467
487
  specification_version: 4
468
488
  summary: GraphQL queries and mutations on top of devise_token_auth
469
489
  test_files:
470
- - spec/spec_helper.rb
471
- - spec/dummy/app/mailers/application_mailer.rb
472
- - spec/dummy/app/models/guest.rb
473
- - spec/dummy/app/models/admin.rb
474
- - spec/dummy/app/models/users/customer.rb
475
- - spec/dummy/app/models/users.rb
476
- - spec/dummy/app/models/application_record.rb
477
- - spec/dummy/app/models/user.rb
478
- - spec/dummy/app/graphql/types/custom_admin_type.rb
479
- - spec/dummy/app/graphql/types/mutation_type.rb
480
- - spec/dummy/app/graphql/types/query_type.rb
481
- - spec/dummy/app/graphql/types/base_object.rb
482
- - spec/dummy/app/graphql/types/user_type.rb
483
- - spec/dummy/app/graphql/mutations/register_confirmed_user.rb
490
+ - spec/dummy/README.md
491
+ - spec/dummy/Rakefile
492
+ - spec/dummy/app/assets/config/manifest.js
493
+ - spec/dummy/app/controllers/api/v1/graphql_controller.rb
494
+ - spec/dummy/app/controllers/application_controller.rb
495
+ - spec/dummy/app/graphql/dummy_schema.rb
496
+ - spec/dummy/app/graphql/interpreter_schema.rb
484
497
  - spec/dummy/app/graphql/mutations/login.rb
498
+ - spec/dummy/app/graphql/mutations/register_confirmed_user.rb
485
499
  - spec/dummy/app/graphql/mutations/sign_up.rb
486
500
  - spec/dummy/app/graphql/resolvers/public_user.rb
487
501
  - spec/dummy/app/graphql/resolvers/user_show.rb
488
- - spec/dummy/app/graphql/dummy_schema.rb
502
+ - spec/dummy/app/graphql/types/base_object.rb
503
+ - spec/dummy/app/graphql/types/custom_admin_type.rb
504
+ - spec/dummy/app/graphql/types/mutation_type.rb
505
+ - spec/dummy/app/graphql/types/query_type.rb
506
+ - spec/dummy/app/graphql/types/user_type.rb
489
507
  - spec/dummy/app/jobs/application_job.rb
490
- - spec/dummy/app/controllers/application_controller.rb
491
- - spec/dummy/app/controllers/api/v1/graphql_controller.rb
508
+ - spec/dummy/app/mailers/application_mailer.rb
509
+ - spec/dummy/app/models/admin.rb
510
+ - spec/dummy/app/models/application_record.rb
511
+ - spec/dummy/app/models/guest.rb
512
+ - spec/dummy/app/models/user.rb
513
+ - spec/dummy/app/models/users.rb
514
+ - spec/dummy/app/models/users/customer.rb
492
515
  - spec/dummy/app/views/layouts/mailer.html.erb
493
516
  - spec/dummy/app/views/layouts/mailer.text.erb
494
- - spec/dummy/app/assets/config/manifest.js
495
- - spec/dummy/bin/update
496
- - spec/dummy/bin/rake
497
- - spec/dummy/bin/setup
498
517
  - spec/dummy/bin/bundle
499
518
  - spec/dummy/bin/rails
500
- - spec/dummy/config/secrets.yml
501
- - spec/dummy/config/routes.rb
502
- - spec/dummy/config/environments/production.rb
503
- - spec/dummy/config/environments/development.rb
504
- - spec/dummy/config/environments/test.rb
505
- - spec/dummy/config/spring.rb
506
- - spec/dummy/config/master.key
507
- - spec/dummy/config/environment.rb
519
+ - spec/dummy/bin/rake
520
+ - spec/dummy/bin/setup
521
+ - spec/dummy/bin/update
522
+ - spec/dummy/config.ru
508
523
  - spec/dummy/config/application.rb
509
- - spec/dummy/config/puma.rb
510
524
  - spec/dummy/config/credentials.yml.enc
511
525
  - spec/dummy/config/database.yml
526
+ - spec/dummy/config/environment.rb
527
+ - spec/dummy/config/environments/development.rb
528
+ - spec/dummy/config/environments/production.rb
529
+ - spec/dummy/config/environments/test.rb
512
530
  - spec/dummy/config/initializers/application_controller_renderer.rb
513
531
  - spec/dummy/config/initializers/backtrace_silencers.rb
532
+ - spec/dummy/config/initializers/cors.rb
533
+ - spec/dummy/config/initializers/devise.rb
514
534
  - spec/dummy/config/initializers/devise_token_auth.rb
515
- - spec/dummy/config/initializers/mime_types.rb
516
535
  - spec/dummy/config/initializers/filter_parameter_logging.rb
517
- - spec/dummy/config/initializers/wrap_parameters.rb
518
536
  - spec/dummy/config/initializers/i18n.rb
519
- - spec/dummy/config/initializers/devise.rb
520
537
  - spec/dummy/config/initializers/inflections.rb
521
- - spec/dummy/config/initializers/cors.rb
522
- - spec/dummy/config.ru
523
- - spec/dummy/README.md
524
- - spec/dummy/Rakefile
525
- - spec/dummy/public/robots.txt
526
- - spec/dummy/db/schema.rb
527
- - spec/dummy/db/seeds.rb
528
- - spec/dummy/db/test.sqlite3
538
+ - spec/dummy/config/initializers/mime_types.rb
539
+ - spec/dummy/config/initializers/wrap_parameters.rb
540
+ - spec/dummy/config/master.key
541
+ - spec/dummy/config/puma.rb
542
+ - spec/dummy/config/routes.rb
543
+ - spec/dummy/config/secrets.yml
544
+ - spec/dummy/config/spring.rb
545
+ - spec/dummy/db/migrate/20190815114303_create_users.rb
546
+ - spec/dummy/db/migrate/20190824215150_add_auth_available_to_users.rb
529
547
  - spec/dummy/db/migrate/20190916012505_create_admins.rb
530
548
  - spec/dummy/db/migrate/20191013213045_create_guests.rb
531
549
  - spec/dummy/db/migrate/20200321121807_create_users_customers.rb
532
- - spec/dummy/db/migrate/20190815114303_create_users.rb
533
- - spec/dummy/db/migrate/20190824215150_add_auth_available_to_users.rb
534
- - spec/dummy/db/development.sqlite3
535
- - spec/dummy/log/test.log
536
- - spec/dummy/log/development.log
537
- - spec/dummy/tmp/development_secret.txt
550
+ - spec/dummy/db/schema.rb
551
+ - spec/dummy/db/seeds.rb
552
+ - spec/dummy/public/robots.txt
553
+ - spec/factories/admins.rb
554
+ - spec/factories/guests.rb
555
+ - spec/factories/users.rb
556
+ - spec/factories/users_customers.rb
557
+ - spec/generators/graphql_devise/install_generator_spec.rb
538
558
  - spec/graphql_devise_spec.rb
539
559
  - spec/models/user_spec.rb
540
- - spec/requests/user_controller_spec.rb
560
+ - spec/rails_helper.rb
561
+ - spec/requests/graphql_controller_spec.rb
562
+ - spec/requests/mutations/additional_mutations_spec.rb
563
+ - spec/requests/mutations/additional_queries_spec.rb
541
564
  - spec/requests/mutations/login_spec.rb
542
565
  - spec/requests/mutations/logout_spec.rb
566
+ - spec/requests/mutations/resend_confirmation_spec.rb
543
567
  - spec/requests/mutations/send_password_reset_spec.rb
544
- - spec/requests/mutations/update_password_spec.rb
545
- - spec/requests/mutations/additional_mutations_spec.rb
546
- - spec/requests/mutations/additional_queries_spec.rb
547
568
  - spec/requests/mutations/sign_up_spec.rb
548
- - spec/requests/mutations/resend_confirmation_spec.rb
549
- - spec/requests/queries/confirm_account_spec.rb
569
+ - spec/requests/mutations/update_password_spec.rb
550
570
  - spec/requests/queries/check_password_token_spec.rb
551
- - spec/support/factory_bot.rb
552
- - spec/support/contexts/graphql_request.rb
553
- - spec/support/requests/auth_helpers.rb
554
- - spec/support/requests/json_helpers.rb
555
- - spec/support/generators/file_helpers.rb
556
- - spec/support/matchers/not_change_matcher.rb
557
- - spec/support/matchers/auth_headers_matcher.rb
558
- - spec/factories/admins.rb
559
- - spec/factories/users.rb
560
- - spec/factories/guests.rb
561
- - spec/factories/users_customers.rb
562
- - spec/generators/graphql_devise/install_generator_spec.rb
563
- - spec/rails_helper.rb
564
- - spec/services/mount_method/option_sanitizers/class_checker_spec.rb
565
- - spec/services/mount_method/option_sanitizers/array_checker_spec.rb
566
- - spec/services/mount_method/option_sanitizers/hash_checker_spec.rb
567
- - spec/services/mount_method/option_sanitizers/string_checker_spec.rb
568
- - spec/services/mount_method/option_sanitizer_spec.rb
569
- - spec/services/mount_method/options_validator_spec.rb
571
+ - spec/requests/queries/confirm_account_spec.rb
572
+ - spec/requests/user_controller_spec.rb
570
573
  - spec/services/mount_method/operation_preparer_spec.rb
571
- - spec/services/mount_method/operation_preparers/gql_name_setter_spec.rb
574
+ - spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb
572
575
  - spec/services/mount_method/operation_preparers/default_operation_preparer_spec.rb
576
+ - spec/services/mount_method/operation_preparers/gql_name_setter_spec.rb
577
+ - spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb
573
578
  - spec/services/mount_method/operation_preparers/resolver_type_setter_spec.rb
574
579
  - spec/services/mount_method/operation_preparers/resource_name_setter_spec.rb
575
- - spec/services/mount_method/operation_preparers/mutation_field_setter_spec.rb
576
- - spec/services/mount_method/operation_preparers/custom_operation_preparer_spec.rb
577
- - spec/services/mount_method/option_validators/supported_operations_validator_spec.rb
580
+ - spec/services/mount_method/operation_sanitizer_spec.rb
581
+ - spec/services/mount_method/option_sanitizer_spec.rb
582
+ - spec/services/mount_method/option_sanitizers/array_checker_spec.rb
583
+ - spec/services/mount_method/option_sanitizers/class_checker_spec.rb
584
+ - spec/services/mount_method/option_sanitizers/hash_checker_spec.rb
585
+ - spec/services/mount_method/option_sanitizers/string_checker_spec.rb
578
586
  - spec/services/mount_method/option_validators/provided_operations_validator_spec.rb
579
587
  - spec/services/mount_method/option_validators/skip_only_validator_spec.rb
580
- - spec/services/mount_method/operation_sanitizer_spec.rb
588
+ - spec/services/mount_method/option_validators/supported_operations_validator_spec.rb
589
+ - spec/services/mount_method/options_validator_spec.rb
590
+ - spec/services/resource_loader_spec.rb
591
+ - spec/services/schema_plugin_spec.rb
592
+ - spec/spec_helper.rb
593
+ - spec/support/contexts/graphql_request.rb
594
+ - spec/support/factory_bot.rb
595
+ - spec/support/matchers/auth_headers_matcher.rb
596
+ - spec/support/matchers/not_change_matcher.rb
597
+ - spec/support/requests/auth_helpers.rb
598
+ - spec/support/requests/json_helpers.rb