debian-mirror-gitlab/app/graphql/resolvers/concerns/issues/look_ahead_preloads.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
732 B
Ruby
Raw Normal View History

2023-01-13 00:05:48 +05:30
# frozen_string_literal: true
module Issues
module LookAheadPreloads
extend ActiveSupport::Concern
prepended do
include ::LooksAhead
end
private
def unconditional_includes
[
{
project: [:project_feature, :group]
},
:author
]
end
def preloads
{
alert_management_alert: [:alert_management_alert],
assignees: [:assignees],
participants: Issue.participant_includes,
timelogs: [:timelogs],
customer_relations_contacts: { customer_relations_contacts: [:group] },
escalation_status: [:incident_management_issuable_escalation_status]
}
end
end
end
Issues::LookAheadPreloads.prepend_mod