Module: Types::MergeRequests::InteractsWithMergeRequest

Extended by:
ActiveSupport::Concern
Includes:
FindClosest
Included in:
AssigneeType, AuthorType, ParticipantType, ReviewerType
Defined in:
app/graphql/types/merge_requests/interacts_with_merge_request.rb

Instance Method Summary collapse

Methods included from FindClosest

#closest_parent

Instance Method Details

#merge_request_interaction(parent:, id: nil) ⇒ Object


18
19
20
21
22
23
24
# File 'app/graphql/types/merge_requests/interacts_with_merge_request.rb', line 18

def merge_request_interaction(parent:, id: nil)
  merge_request = closest_parent([::Types::MergeRequestType], parent)

  return unless merge_request

  Users::MergeRequestInteraction.new(user: object, merge_request: merge_request)
end