Module: Types::MergeRequests::InteractsWithMergeRequest

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

Instance Method Summary collapse

Instance Method Details

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



16
17
18
19
20
# File 'app/graphql/types/merge_requests/interacts_with_merge_request.rb', line 16

def merge_request_interaction(parent:, id: nil)
  # need the connection parent if called from a connection node:
  parent = parent.parent if parent.try(:field)&.connection?
  ::Users::MergeRequestInteraction.new(user: object, merge_request: parent)
end