Lack of expose_authorization_rules for Interface
amkisko opened this issue · 2 comments
amkisko commented
My current implementation:
include ActionPolicy::Behaviour
field :can_ignore, ActionPolicy::GraphQL::Types::AuthorizationResult, null: false
def can_ignore
allowed_to? :ignore?
end
palkan commented
Try adding Fields
module explicitly:
include ActionPolicy::Behaviour
include ActionPolicy::GraphQL::Fields
expose_authorization_rules ...
amkisko commented
Well, yeah, in this case it should be explicitly included to exact interface, then it works. :)