Class: GraphQL::Pundit::Instrumenters::BeforeScope::ScopeResolver
- Inherits:
-
ScopeResolver
- Object
- ScopeResolver
- GraphQL::Pundit::Instrumenters::BeforeScope::ScopeResolver
- Defined in:
- lib/graphql-pundit/instrumenters/before_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 20 21 22 23 24 25 |
# File 'lib/graphql-pundit/instrumenters/before_scope.rb', line 15 def call(root, arguments, context) if field.[:before_scope][:deprecated] Kernel.warn " Using `scope` is deprecated and might be removed in the future.\n Please use `before_scope` or `after_scope` instead.\n DEPRECATION_WARNING\n end\n scope_proc = new_scope(scope)\n resolver_result = scope_proc.call(root, arguments, context)\n old_resolver.call(resolver_result, arguments, context)\nend\n" |