Class: GraphQL::Pundit::Instrumenters::AfterScope::ScopeResolver

Inherits:
ScopeResolver
  • Object
show all
Defined in:
lib/graphql-pundit/instrumenters/after_scope.rb

Overview

Applies the scoping to the passed object

Instance Method Summary collapse

Instance Method Details

#call(root, arguments, context) ⇒ Object



15
16
17
18
19
# File 'lib/graphql-pundit/instrumenters/after_scope.rb', line 15

def call(root, arguments, context)
  resolver_result = old_resolver.call(root, arguments, context)
  scope_proc = new_scope(scope)
  scope_proc.call(resolver_result, arguments, context)
end