Module: Mutations::ResolvesIssuable

Extended by:
ActiveSupport::Concern
Included in:
DesignManagement::Base, Issues::Base, Issues::SetSubscription, MergeRequests::Base, MergeRequests::SetSubscription
Defined in:
app/graphql/mutations/concerns/mutations/resolves_issuable.rb

Instance Method Summary collapse

Instance Method Details

#resolve_issuable(type:, parent_path:, iid:) ⇒ Object



11
12
13
14
15
16
17
# File 'app/graphql/mutations/concerns/mutations/resolves_issuable.rb', line 11

def resolve_issuable(type:, parent_path:, iid:)
  parent = ::Gitlab::Graphql::Lazy.force(resolve_issuable_parent(type, parent_path))
  return unless parent.present?

  finder = issuable_finder(type, iids: [iid])
  Gitlab::Graphql::Loaders::IssuableLoader.new(parent, finder).find_all.first
end