Class: Types::Users::AutocompletedUserType

Inherits:
Types::UserType show all
Defined in:
app/graphql/types/users/autocompleted_user_type.rb

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#merge_request_interaction(id: nil) ⇒ Object



17
18
19
20
21
# File 'app/graphql/types/users/autocompleted_user_type.rb', line 17

def merge_request_interaction(id: nil)
  Gitlab::Graphql::Lazy.with_value(GitlabSchema.object_from_id(id, expected_class: ::MergeRequest)) do |mr|
    ::Users::MergeRequestInteraction.new(user: object.user, merge_request: mr) if mr
  end
end