1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# frozen_string_literal: true
module Types
class WorkItemType < BaseObject
graphql_name 'WorkItem'
implements(Types::TodoableInterface)
authorize :read_work_item
field :author, Types::UserType, null: true,
description: 'User that created the work item.',
alpha: { milestone: '15.9' }
field :closed_at, Types::TimeType, null: true,
description: 'Timestamp of when the work item was closed.'
field :confidential, GraphQL::Types::Boolean, null: false,
description: 'Indicates the work item is confidential.'
field :created_at, Types::TimeType, null: false,
description: 'Timestamp of when the work item was created.'
field :description, GraphQL::Types::String, null: true,
description: 'Description of the work item.'
field :id, Types::GlobalIDType[::WorkItem], null: false,
description: 'Global ID of the work item.'
field :iid, GraphQL::Types::ID, null: false,
description: 'Internal ID of the work item.'
field :lock_version,
GraphQL::Types::Int,
null: false,
description: 'Lock version of the work item. Incremented each time the work item is updated.'
field :namespace, Types::NamespaceType, null: true,
description: 'Namespace the work item belongs to.',
alpha: { milestone: '15.10' }
field :project, Types::ProjectType, null: true,
description: 'Project the work item belongs to.',
alpha: { milestone: '15.3' }
field :state, WorkItemStateEnum, null: false,
description: 'State of the work item.'
field :title, GraphQL::Types::String, null: false,
description: 'Title of the work item.'
field :updated_at, Types::TimeType, null: false,
description: 'Timestamp of when the work item was last updated.'
field :widgets,
[Types::WorkItems::WidgetInterface],
null: true,
description: 'Collection of widgets that belong to the work item.'
field :work_item_type, Types::WorkItems::TypeType, null: false,
description: 'Type assigned to the work item.'
markdown_field :title_html, null: true
markdown_field :description_html, null: true
expose_permissions Types::PermissionTypes::WorkItem
def web_url
Gitlab::UrlBuilder.build(object)
end
end
end
|