Class: Types::WorkItems::TypeType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/work_items/type_type.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Class Method Details

.authorization_scopesObject



10
11
12
# File 'app/graphql/types/work_items/type_type.rb', line 10

def self.authorization_scopes
  super + [:ai_workflows]
end

Instance Method Details

#supported_conversion_typesObject



130
131
132
# File 'app/graphql/types/work_items/type_type.rb', line 130

def supported_conversion_types
  object.supported_conversion_types(context[:resource_parent], current_user)
end

#unavailable_widgets_on_conversion(target:) ⇒ Object



134
135
136
137
138
139
140
141
# File 'app/graphql/types/work_items/type_type.rb', line 134

def unavailable_widgets_on_conversion(target:)
  source_type = object
  target_type = GitlabSchema.find_by_gid(target).sync

  return [] unless source_type && target_type

  source_type.unavailable_widgets_on_conversion(target_type, context[:resource_parent])
end

#widget_definitionsObject



126
127
128
# File 'app/graphql/types/work_items/type_type.rb', line 126

def widget_definitions
  object.widgets(context[:resource_parent])
end

#widgetsObject



122
123
124
# File 'app/graphql/types/work_items/type_type.rb', line 122

def widgets
  object.widget_definitions(context[:resource_parent])
end