diff options
Diffstat (limited to 'app/graphql/types/merge_request_type.rb')
-rw-r--r-- | app/graphql/types/merge_request_type.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/graphql/types/merge_request_type.rb b/app/graphql/types/merge_request_type.rb index cd4c6b4d46a..cb4ff7ea0c5 100644 --- a/app/graphql/types/merge_request_type.rb +++ b/app/graphql/types/merge_request_type.rb @@ -28,6 +28,8 @@ module Types description: 'Timestamp of when the merge request was created' field :updated_at, Types::TimeType, null: false, description: 'Timestamp of when the merge request was last updated' + field :merged_at, Types::TimeType, null: true, complexity: 5, + description: 'Timestamp of when the merge request was merged, null if not merged' field :source_project, Types::ProjectType, null: true, description: 'Source project of the merge request' field :target_project, Types::ProjectType, null: false, @@ -81,8 +83,14 @@ module Types description: 'Default merge commit message of the merge request' field :merge_ongoing, GraphQL::BOOLEAN_TYPE, method: :merge_ongoing?, null: false, description: 'Indicates if a merge is currently occurring' - field :source_branch_exists, GraphQL::BOOLEAN_TYPE, method: :source_branch_exists?, null: false, + field :source_branch_exists, GraphQL::BOOLEAN_TYPE, + null: false, calls_gitaly: true, + method: :source_branch_exists?, description: 'Indicates if the source branch of the merge request exists' + field :target_branch_exists, GraphQL::BOOLEAN_TYPE, + null: false, calls_gitaly: true, + method: :target_branch_exists?, + description: 'Indicates if the target branch of the merge request exists' field :mergeable_discussions_state, GraphQL::BOOLEAN_TYPE, null: true, description: 'Indicates if all discussions in the merge request have been resolved, allowing the merge request to be merged' field :web_url, GraphQL::STRING_TYPE, null: true, @@ -103,6 +111,8 @@ module Types resolve: -> (obj, _args, _ctx) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Milestone, obj.milestone_id).find } field :assignees, Types::UserType.connection_type, null: true, complexity: 5, description: 'Assignees of the merge request' + field :author, Types::UserType, null: true, + description: 'User who created this merge request' field :participants, Types::UserType.connection_type, null: true, complexity: 5, description: 'Participants in the merge request' field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5, |