action_policy-graphql 0.5.2 → 0.5.3

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
  SHA256:
3
- metadata.gz: 5126db7b4d19dd644abae6e400e40b0c2a9c7860da2851eb13644bdf247e4b5a
4
- data.tar.gz: cffccd7267712826f13ac8e53475f24ad56532a1c090d1c9e74b6797c7081123
3
+ metadata.gz: bd65d3395a5a17016bbf6437bdcc300c1c515d3a6ec72aa4a9f499c0f642fbce
4
+ data.tar.gz: 3fde00df90ed713411873303ddf920937c9bcc92d7db37f765eecfc7e03a408c
5
5
  SHA512:
6
- metadata.gz: a20f415b4200c130e32c2a04adecd647cd6c466ddd355e48e2ac0059b912701dca0d2cdde9c791ba40d1b83d3916de55dff89bf698058399925cbe8de05025ea
7
- data.tar.gz: 5ffa1734654b633f935d7897316497e84fb8dfa8f9b13cf1f6eea7b50d622a21bcc448aae03711bbfc0cee09f7ca0385b168fbc20854e22e42c2de5f2ccf3683
6
+ metadata.gz: 7474adcbe2a40bb7ac9f30ac3068987ac419c56e394dafd1440d6ad1f4457f7a07aa5c5ef8ec07e8fee348bd8e464a753fd4306070a00af500af0e53755925dc
7
+ data.tar.gz: 04aaf4d7dacd8ad07324dc913e45b04a43f515e79ca6de7d530436d357b559bdd52632ae9231a799b9255139d574e744e2a3c1c453e3838213a33d409efea5be
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.5.3 (2021-02-26)
6
+
7
+ - Fix compatibility with graphql-ruby 1.12.4 ([@haines][])
8
+
5
9
  ## 0.5.2 (2020-10-20)
6
10
 
7
11
  - Fix modules reloading in development. ([@rzaharenkov][])
@@ -39,7 +39,7 @@ module ActionPolicy
39
39
  end
40
40
 
41
41
  def apply
42
- self.class.show_authorize_mutation_deprecation if field.mutation
42
+ self.class.show_authorize_mutation_deprecation if field.mutation && field.mutation < ::GraphQL::Schema::Mutation
43
43
 
44
44
  @to = extract_option(:to) { ::ActionPolicy::GraphQL.default_authorize_rule }
45
45
  @raise = extract_option(:raise) { ::ActionPolicy::GraphQL.authorize_raise_exception }
@@ -114,7 +114,8 @@ module ActionPolicy
114
114
  end
115
115
 
116
116
  class ScopeExtension < Extension
117
- def after_resolve(value:, context:, object:, **_rest)
117
+ def resolve(context:, object:, arguments:, **_rest)
118
+ value = yield(object, arguments)
118
119
  return value if value.nil?
119
120
 
120
121
  object.authorized_scope(value, **options)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActionPolicy
4
4
  module GraphQL
5
- VERSION = "0.5.2"
5
+ VERSION = "0.5.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_policy-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-20 00:00:00.000000000 Z
11
+ date: 2021-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: action_policy