Class: Types::IssuableType

Inherits:
BaseUnion
  • Object
show all
Defined in:
app/graphql/types/issuable_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/issuable_type.rb', line 10

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