module GraphQL::Schema::Member::Scoped

def inherited(subclass)

def inherited(subclass)
  super
  subclass.class_eval do
    @reauthorize_scoped_objects = nil
  end
end

def reauthorize_scoped_objects(new_value = nil)

def reauthorize_scoped_objects(new_value = nil)
  if new_value.nil?
    if @reauthorize_scoped_objects != nil
      @reauthorize_scoped_objects
    else
      find_inherited_value(:reauthorize_scoped_objects, true)
    end
  else
    @reauthorize_scoped_objects = new_value
  end
end

def scope_items(items, context)

Returns:
  • (Object) - Another list-like object, scoped to the current context

Parameters:
  • context (GraphQL::Query::Context) --
  • items (Object) -- Some list-like object (eg, Array, ActiveRecord::Relation)
def scope_items(items, context)
  items
end