Module: Types::Notes::NoteableInterface

Includes:
BaseInterface
Defined in:
app/graphql/types/notes/noteable_interface.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.resolve_type(object, context) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'app/graphql/types/notes/noteable_interface.rb', line 14

def self.resolve_type(object, context)
  case object
  when Issue
    Types::IssueType
  when MergeRequest
    Types::MergeRequestType
  when Snippet
    Types::SnippetType
  when ::DesignManagement::Design
    Types::DesignManagement::DesignType
  when ::AlertManagement::Alert
    Types::AlertManagement::AlertType
  when WikiPage::Meta
    Types::Wikis::WikiPageType
  else
    raise "Unknown GraphQL type for #{object}"
  end
end

Instance Method Details

#commentersObject



33
34
35
# File 'app/graphql/types/notes/noteable_interface.rb', line 33

def commenters
  object.commenters(user: current_user)
end