class GraphQL::Pundit::Instrumenters::BeforeScope::ScopeResolver
Applies the scoping to the passed object
Public Instance Methods
call(root, arguments, context)
click to toggle source
# File lib/graphql-pundit/instrumenters/before_scope.rb, line 15 def call(root, arguments, context) if field.metadata[:before_scope][:deprecated] Kernel.warn <<~DEPRECATION_WARNING Using `scope` is deprecated and might be removed in the future. Please use `before_scope` or `after_scope` instead. DEPRECATION_WARNING end scope_proc = new_scope(scope) resolver_result = scope_proc.call(root, arguments, context) old_resolver.call(resolver_result, arguments, context) end