Module: Types::WorkItems::WidgetInterface

Includes:
BaseInterface
Defined in:
app/graphql/types/work_items/widget_interface.rb

Class Method Summary collapse

Class Method Details

.resolve_type(object, context) ⇒ Object


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

def self.resolve_type(object, context)
  case object
  when ::WorkItems::Widgets::Description
    ::Types::WorkItems::Widgets::DescriptionType
  when ::WorkItems::Widgets::Hierarchy
    ::Types::WorkItems::Widgets::HierarchyType
  when ::WorkItems::Widgets::Assignees
    ::Types::WorkItems::Widgets::AssigneesType
  when ::WorkItems::Widgets::Weight
    ::Types::WorkItems::Widgets::WeightType
  else
    raise "Unknown GraphQL type for widget #{object}"
  end
end