graphql-activerecord 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b747cb0c89283eb53f5bed955aba5ac63c67e403
|
4
|
+
data.tar.gz: 6fc9db07f08a93526bc4d2d6cae816efd4ecf0d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9724e12c8b19c2361183aaf25e2823e19c262c0a36ff27d038bc4d7a8972fb63ccfc1104a5e7c3eac450bf1e4a680e0d57daa1718c52ecbaef6b5b71ddb11fa
|
7
|
+
data.tar.gz: 32d5a9dbfed54b57b8e201299294a5413c6958f623c1f83ec8782f6668f26b5967876194097699b7a144d3d0ee88aa8959ef99addcc5aaf2eb0e14533babf1a2
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_runtime_dependency "activesupport", ">= 4.2", '< 5'
|
23
23
|
spec.add_runtime_dependency "activerecord", ">= 4.2", '< 5'
|
24
|
-
spec.add_runtime_dependency "graphql", ">= 1.
|
24
|
+
spec.add_runtime_dependency "graphql", ">= 1.4", '< 2'
|
25
25
|
spec.add_runtime_dependency "graphql-batch", ">= 0.2.4"
|
26
26
|
|
27
27
|
spec.add_development_dependency "bundler", "~> 1.11"
|
@@ -205,7 +205,9 @@ module GraphQL
|
|
205
205
|
GraphQL::Define::AssignConnection.call(graph_type, camel_name, type_lambda) do
|
206
206
|
resolve -> (model, args, context) do
|
207
207
|
return nil unless model
|
208
|
-
|
208
|
+
|
209
|
+
# TODO: Figure out a way to remove this from the gem. It's only applicable to GoCo's codebase.
|
210
|
+
GraphSupport.secure(model.public_send(association), context, permission: options[:permission] || :read)
|
209
211
|
end
|
210
212
|
end
|
211
213
|
end
|
@@ -5,10 +5,10 @@ class GraphQL::Models::Middleware
|
|
5
5
|
@skip_nil_models = skip_nil_models
|
6
6
|
end
|
7
7
|
|
8
|
-
def call(graphql_type, object, field_definition, args, context
|
8
|
+
def call(graphql_type, object, field_definition, args, context)
|
9
9
|
# If this field defines a path, load the associations in the path
|
10
10
|
field_info = GraphQL::Models.field_info(graphql_type, field_definition.name)
|
11
|
-
return
|
11
|
+
return yield unless field_info
|
12
12
|
|
13
13
|
# Convert the core object into the model
|
14
14
|
base_model = field_info.object_to_base_model.call(object)
|
@@ -17,7 +17,7 @@ class GraphQL::Models::Middleware
|
|
17
17
|
next nil if model.nil? && @skip_nil_models
|
18
18
|
|
19
19
|
next_args = [graphql_type, model, field_definition, args, context]
|
20
|
-
|
20
|
+
yield(next_args)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Foster
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 1.
|
59
|
+
version: '1.4'
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '2'
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.
|
69
|
+
version: '1.4'
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '2'
|