Welcome to mirror list, hosted at ThFree Co, Russian Federation.

resolves_ids.rb « concerns « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3e248c405626c3ffbac223aa113959a5ecb30117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module ResolvesIds
  extend ActiveSupport::Concern

  def resolve_ids(ids)
    Array.wrap(ids).map do |id|
      next unless id.present?

      id.model_id
    end.compact
  end
end