summaryrefslogtreecommitdiff
path: root/app/graphql/resolvers/concerns/resolves_ids.rb
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