graphql_rails 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/graphql_rails/controller/action.rb +1 -7
- data/lib/graphql_rails/model/configuration.rb +8 -0
- data/lib/graphql_rails/version.rb +1 -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: 6960308081875563c429085033503f5f6eb4f5078eb610c0a96e95edb4879e6f
|
4
|
+
data.tar.gz: 84b19c7d4811f988ba4caf14eee6f3beb04b460ed92fc39b2d428ef219b44d38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36cc14d59e7df9f050844e9406596d69bbf97411ec192d1081b630277dc1de5f18706006f5c41072ccc1983aa23d2638d4a96fb7ed10ec7955e5ed0acee28bdc
|
7
|
+
data.tar.gz: 9136375cc875cd7db7d29fd7aac2507cca4364f1504432d7328d629b86e795422a2a48239ea1d98915d3217c7f355c74aa598d9133dc49277dda2cb78fdeb3dc
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
graphql_rails (0.3.
|
4
|
+
graphql_rails (0.3.2)
|
5
5
|
activesupport (>= 4)
|
6
6
|
graphql (~> 1)
|
7
7
|
|
@@ -29,7 +29,7 @@ GEM
|
|
29
29
|
concurrent-ruby (1.0.5)
|
30
30
|
diff-lcs (1.3)
|
31
31
|
docile (1.3.0)
|
32
|
-
graphql (1.8.
|
32
|
+
graphql (1.8.4)
|
33
33
|
i18n (1.0.1)
|
34
34
|
concurrent-ruby (~> 1.0)
|
35
35
|
json (2.1.0)
|
@@ -65,18 +65,12 @@ module GraphqlRails
|
|
65
65
|
|
66
66
|
def default_collection_type
|
67
67
|
if action_config.paginated?
|
68
|
-
|
68
|
+
action_model.graphql.connection_type
|
69
69
|
else
|
70
70
|
default_inner_return_type.to_list_type.to_non_null_type
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
-
def default_connection_type
|
75
|
-
model_graphql_type.define_connection do
|
76
|
-
field :total, types.Int, resolve: ->(obj, _args, _ctx) { obj.nodes.size }
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
74
|
def action_relative_path
|
81
75
|
route.relative_path
|
82
76
|
end
|
@@ -39,6 +39,14 @@ module GraphqlRails
|
|
39
39
|
).call
|
40
40
|
end
|
41
41
|
|
42
|
+
def connection_type
|
43
|
+
@connection_type ||= begin
|
44
|
+
graphql_type.define_connection do
|
45
|
+
field :total, types.Int, resolve: ->(obj, _args, _ctx) { obj.nodes.size }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
42
50
|
private
|
43
51
|
|
44
52
|
attr_reader :model_class
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Povilas Jurčys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|