graphql-activerecord 0.9.0 → 0.9.1

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
  SHA1:
3
- metadata.gz: 70988fb9de29f5357e4247ea1e4eafb5b58025d9
4
- data.tar.gz: d8eeaab546711b664003a051fa33d733cc5a6e85
3
+ metadata.gz: b747cb0c89283eb53f5bed955aba5ac63c67e403
4
+ data.tar.gz: 6fc9db07f08a93526bc4d2d6cae816efd4ecf0d5
5
5
  SHA512:
6
- metadata.gz: 8813510d8b4a2fd32367abd1b76eb51cf321ab995de9c9923cd3368b5350df6947fec3d5aa7aadc3ef7fe4f55dc4d85f44041e720243f4a618a3a1465c293637
7
- data.tar.gz: a16ba42da0662d229b26f767aeb0cb81fa7cc2522887832ecd2eb3f7e333f9b6307b121572d6c72fbf1ed511958850075057dd8317ffefc68f48c80370621af3
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.2.1", '< 2'
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
- return GraphSupport.secure(model.public_send(association), context)
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, next_middleware)
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 next_middleware.call unless field_info
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
- next_middleware.call(next_args)
20
+ yield(next_args)
21
21
  end
22
22
  end
23
23
  end
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Models
3
- VERSION = "0.9.0"
3
+ VERSION = "0.9.1"
4
4
  end
5
5
  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.0
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: 2016-12-05 00:00:00.000000000 Z
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.2.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.2.1
69
+ version: '1.4'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
72
  version: '2'