lib/rails/graphql/request/steps/authorizable.rb
def authorize_on_object(object)
              as_class = object.is_a?(Class)
              checker = as_class ? :method_defined? : :respond_to?

              return false unless object.public_send(checker, :authorize!)
              as_class ? data[:request].strategy.instance_for(object) : object
            end
# Check if it should run call an +authorize!+ method on the given
# +object+. Classes are turn into instance through strategy
Check if it should run call an +authorize!+ method on the given
+object+. Classes are turn into instance through strategy
Check if it should run call an + authorize! + method on the given + object + . Classes are turn into instance through strategy
def authorize_on_object(object)
              as_class = object.is_a?(Class)
              checker = as_class ? :method_defined? : :respond_to?
              return false unless object.public_send(checker, :authorize!)
              as_class ? data[:request].strategy.instance_for(object) : object
            end
def authorize_on_object ( object ) as_class = object . is_a? ( Class ) checker = as_class ? :method_defined? : :respond_to? return false unless object . public_send ( checker , :authorize! ) as_class ? data [ :request ] . strategy . instance_for ( object ) : object end
Check if it should run call an +authorize!+ method on the given
+object+.
Check if it should run call an + authorize! + method on the given + object + .
object