<commit_before>class DevelopersResolver
  attr_reader :params

  def self.call(*args)
    new(*args).call
  end

  def initialize(_obj, args, _ctx)
    @params = args.instance_variable_get(:@argument_values).to_h
  end

  def call
    query = Rails.cache.read('search_query')
    if params['hireable'].present? || !query[:search]
      api.fetch_hireable_developers(query)
    else
      api.fetch_developers(query)
    end
  end

  private

  def api
    Github::Api.new
  end
end<commit_msg>Setup refetching hireables<commit_after>class DevelopersResolver
  attr_reader :params

  def self.call(*args)
    new(*args).call
  end

  def initialize(_obj, args, _ctx)
    @params = args.instance_variable_get(:@argument_values).to_h
  end

  def call
    query = Rails.cache.read('search_query')
    if params['hireable'].present? || !query[:search]
      hireables = api.fetch_hireable_developers(query)
      count = hireables.length

      while count < 51 && query[:page] < 18
        query[:page] += 1
        hireables.push(*(api.fetch_hireable_developers(query)))
        count = hireables.length
      end

      hireables.take(51)
    else
      api.fetch_developers(query)
    end
  end

  private

  def api
    Github::Api.new
  end
end
{'fraction_non_alphanumeric': 0.10674157303370786, 'fraction_numerical': 0.0056179775280898875, 'mean_word_length': 3.1566666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1449749', 'n_tokens_mistral': 422, 'n_tokens_neox': 401, 'n_words': 82}