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
|
# frozen_string_literal: true
module Types
class UserMergeRequestInteractionType < BaseObject
graphql_name 'UserMergeRequestInteraction'
description <<~MD
Information about a merge request given a specific user.
This object has two parts to its state: a `User` and a `MergeRequest`. All
fields relate to interactions between the two entities.
MD
authorize :read_merge_request
field :can_merge,
type: ::GraphQL::BOOLEAN_TYPE,
null: false,
calls_gitaly: true,
method: :can_merge?,
description: 'Whether this user can merge this merge request.'
field :can_update,
type: ::GraphQL::BOOLEAN_TYPE,
null: false,
method: :can_update?,
description: 'Whether this user can update this merge request.'
field :review_state,
::Types::MergeRequestReviewStateEnum,
null: true,
description: 'The state of the review by this user.'
field :reviewed,
type: ::GraphQL::BOOLEAN_TYPE,
null: false,
method: :reviewed?,
description: 'Whether this user has provided a review for this merge request.'
field :approved,
type: ::GraphQL::BOOLEAN_TYPE,
null: false,
method: :approved?,
description: 'Whether this user has approved this merge request.'
end
end
::Types::UserMergeRequestInteractionType.prepend_if_ee('EE::Types::UserMergeRequestInteractionType')
|