Module: Types::TodoableInterface

Includes:
BaseInterface
Defined in:
app/graphql/types/todoable_interface.rb

Class Method Summary collapse

Class Method Details

.resolve_type(object, context) ⇒ Object


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/graphql/types/todoable_interface.rb', line 11

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