rspec-graphql_types 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73d57da52abe0701765d0a4e82cc715122ea1873b0a338165922dd4cc5850524
4
- data.tar.gz: 758b9c0bbeaee55f163da3c37afa82ea39a39895e251b451e81077682eecccd4
3
+ metadata.gz: 0b26a72d1bc61381743a808750c282886f0892fd277eacae8298a2261c782064
4
+ data.tar.gz: 4d61e897fecbf31446cfd8c793c5ab3218a920750651be55d8128486a798f0db
5
5
  SHA512:
6
- metadata.gz: 6998816e11ead713e01ca10677e45f58e101e615b165ccda2c385c079f0348fa9b1949d54bfee287ebab8c2271d685cdc54319f414a0740dd2bf7445dda01028
7
- data.tar.gz: 2e724d24dc3e622c1ca98901b3bf33031fab226041053e5327e5234519dd2670bde18e037ebdd06cb91897b6bf39c2e0a87bf005966dfa5183b65734faff8028
6
+ metadata.gz: 11b001aecaad4aa7993a17be7f79e81911d37a75834541214e7bc125b32e39b4e29de98055db230b27c59cb25a8ee36d80c9649661f623af5bc202b5cb65f040
7
+ data.tar.gz: b5a8ee65f2303de6bc9cc2a8e7f584bb94bfc0c8cb5f76c40ce4607ef98310d2e6d05fc34c939f5f0d287d4db3e5fc066da086762f409be860a54adaa828c066
data/Gemfile.lock CHANGED
@@ -1,25 +1,38 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-graphql_types (1.0.3)
4
+ rspec-graphql_types (1.0.6)
5
5
  activesupport
6
6
  graphql
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (6.1.4.1)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
11
+ activesupport (7.2.1.2)
12
+ base64
13
+ bigdecimal
14
+ concurrent-ruby (~> 1.0, >= 1.3.1)
15
+ connection_pool (>= 2.2.5)
16
+ drb
13
17
  i18n (>= 1.6, < 2)
18
+ logger (>= 1.4.2)
14
19
  minitest (>= 5.1)
15
- tzinfo (~> 2.0)
16
- zeitwerk (~> 2.3)
17
- concurrent-ruby (1.1.9)
20
+ securerandom (>= 0.3)
21
+ tzinfo (~> 2.0, >= 2.0.5)
22
+ base64 (0.2.0)
23
+ bigdecimal (3.1.8)
24
+ concurrent-ruby (1.3.4)
25
+ connection_pool (2.4.1)
18
26
  diff-lcs (1.4.4)
19
- graphql (1.12.16)
20
- i18n (1.8.10)
27
+ drb (2.2.1)
28
+ fiber-storage (1.0.0)
29
+ graphql (2.3.19)
30
+ base64
31
+ fiber-storage
32
+ i18n (1.14.6)
21
33
  concurrent-ruby (~> 1.0)
22
- minitest (5.14.4)
34
+ logger (1.6.1)
35
+ minitest (5.25.1)
23
36
  rake (13.0.3)
24
37
  rspec (3.10.0)
25
38
  rspec-core (~> 3.10.0)
@@ -34,12 +47,13 @@ GEM
34
47
  diff-lcs (>= 1.2.0, < 2.0)
35
48
  rspec-support (~> 3.10.0)
36
49
  rspec-support (3.10.2)
37
- tzinfo (2.0.4)
50
+ securerandom (0.3.1)
51
+ tzinfo (2.0.6)
38
52
  concurrent-ruby (~> 1.0)
39
- zeitwerk (2.4.2)
40
53
 
41
54
  PLATFORMS
42
55
  arm64-darwin-20
56
+ arm64-darwin-23
43
57
  x86_64-darwin-20
44
58
 
45
59
  DEPENDENCIES
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rspec
4
4
  module GraphQLTypes
5
- VERSION = "1.0.4"
5
+ VERSION = "1.0.6"
6
6
  end
7
7
  end
@@ -8,7 +8,7 @@ module Rspec
8
8
  module GraphQLTypes
9
9
  extend ActiveSupport::Concern
10
10
 
11
- class TestQuery < GraphQL::Query::NullContext::NullQuery
11
+ class TestQuery < ::GraphQL::Query::NullContext::NullQuery
12
12
  def trace(_key, _data)
13
13
  yield
14
14
  end
@@ -23,7 +23,9 @@ module Rspec
23
23
  end
24
24
 
25
25
  included do
26
- let(:context) { GraphQL::Query::Context.new(query: TestQuery.new, values: nil, object: nil, schema: GraphQLTypes.schema_class.new) }
26
+ let(:context_values) { nil }
27
+ let(:schema) { ::GraphQL::VERSION.start_with?("1") ? GraphQLTypes.schema_class.new : GraphQLTypes.schema_class }
28
+ let(:context) { ::GraphQL::Query::Context.new(query: TestQuery.new, values: context_values, object: nil, schema: schema) }
27
29
  end
28
30
 
29
31
  def graphql_object(type, value)
@@ -55,6 +57,7 @@ module Rspec
55
57
  value = context.dataloader.run_isolated do
56
58
  graphql_field.resolve(object, arguments, context)
57
59
  end
60
+ raise value if value.is_a?(Exception)
58
61
  graphql_object(graphql_field.type, value)
59
62
  end
60
63
 
@@ -71,7 +74,7 @@ module Rspec
71
74
  end
72
75
 
73
76
  def self.schema_class
74
- schemas = GraphQL::Schema.subclasses.filter { |schema| !schema.name.start_with?("GraphQL::") }
77
+ schemas = ::GraphQL::Schema.subclasses.filter { |schema| !schema.name.start_with?("GraphQL::") }
75
78
  raise "Could not find valid schema. Please ensure that GraphQL::Schema.subclasses returns a single schema" unless schemas.length == 1
76
79
  schemas.first
77
80
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-graphql_types
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tejas Dinkar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-25 00:00:00.000000000 Z
11
+ date: 2024-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.2.32
85
+ rubygems_version: 3.3.26
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Test out types in ruby graphql