Class: Types::NoteableType

Inherits:
BaseUnion
  • Object
show all
Defined in:
app/graphql/types/noteable_type.rb

Class Method Summary collapse

Methods inherited from BaseUnion

authorized?

Class Method Details

.resolve_type(object, context) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/graphql/types/noteable_type.rb', line 10

def self.resolve_type(object, context)
  case object
  when Issue
    Types::IssueType
  when ::DesignManagement::Design
    Types::DesignManagement::DesignType
  when MergeRequest
    Types::MergeRequestType
  else
    raise 'Unsupported issuable type'
  end
end