module GraphQL::Autoload

def autoload(const_name, path)

Returns:
  • (void) -

Parameters:
  • path (String) --
  • const_name (Symbol) --
def autoload(const_name, path)
  @_eagerloaded_constants ||= []
  @_eagerloaded_constants << const_name
  super const_name, path
end

def eager_load!

Returns:
  • (void) -
def eager_load!
  @_eager_loading = true
  if @_eagerloaded_constants
    @_eagerloaded_constants.each { |const_name| const_get(const_name) }
    @_eagerloaded_constants = nil
  end
  nil
ensure
  @_eager_loading = false
end

def eager_loading?

Returns:
  • (Boolean) - `true` if GraphQL-Ruby is currently eager-loading its constants
def eager_loading?
  @_eager_loading ||= false
end