Class: Types::WorkItems::TypeType
- Inherits:
-
BaseObject
- Object
- GraphQL::Schema::Object
- BaseObject
- Types::WorkItems::TypeType
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
#present, #unpresented
Class Method Details
.authorization_scopes ⇒ Object
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_types ⇒ Object
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
|
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
|
126
127
128
|
# File 'app/graphql/types/work_items/type_type.rb', line 126
def widget_definitions
object.widgets(context[:resource_parent])
end
|
122
123
124
|
# File 'app/graphql/types/work_items/type_type.rb', line 122
def widgets
object.widget_definitions(context[:resource_parent])
end
|