rspec-graphql_types 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspec/graphql_types/version.rb +1 -1
- data/lib/rspec/graphql_types.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71d9e4107a617bb6b00c6510139162fd5334b56bbc2bdba1969f8ea30570c204
|
4
|
+
data.tar.gz: 8a067ac01ce90d84db19807c907b95d40c1576b2a47ebdad96b0a88a4b6a7fa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab7ebe43158db7914e77c84760b7f89caf3e943d1453abd9c0463ad03302f688c44a514b904e72b1f080f15901000f593c6bc53c1d1adda48a279e50cfa2b077
|
7
|
+
data.tar.gz: 7a7d5f28f2df92b424a27378800aed6c8349445aff0325b626facce4699d27522471126ab51e39f37556d897c6ccfb68680d8b47ea7e3d17ba0548279666b969
|
data/lib/rspec/graphql_types.rb
CHANGED
@@ -23,7 +23,8 @@ module Rspec
|
|
23
23
|
end
|
24
24
|
|
25
25
|
included do
|
26
|
-
let(:
|
26
|
+
let(:context_values) { nil }
|
27
|
+
let(:context) { GraphQL::Query::Context.new(query: TestQuery.new, values: context_values, object: nil, schema: GraphQLTypes.schema_class.new) }
|
27
28
|
end
|
28
29
|
|
29
30
|
def graphql_object(type, value)
|
@@ -55,6 +56,7 @@ module Rspec
|
|
55
56
|
value = context.dataloader.run_isolated do
|
56
57
|
graphql_field.resolve(object, arguments, context)
|
57
58
|
end
|
59
|
+
raise value if value.is_a?(Exception)
|
58
60
|
graphql_object(graphql_field.type, value)
|
59
61
|
end
|
60
62
|
|
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
|
+
version: 1.0.5
|
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-
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|