diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 21:06:41 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 21:06:41 +0000 |
commit | da35510cdad8f8d3cb6c119682dc2735531983cd (patch) | |
tree | d42432c9ddc0d55a3c6316cdb539af11244a148f /app/graphql/types/merge_request_type.rb | |
parent | 7f82744e89f22bdd2d13f85ca4dc66e088f3da5c (diff) | |
download | gitlab-ce-da35510cdad8f8d3cb6c119682dc2735531983cd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/types/merge_request_type.rb')
-rw-r--r-- | app/graphql/types/merge_request_type.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app/graphql/types/merge_request_type.rb b/app/graphql/types/merge_request_type.rb index 1baaa33c819..71a65dc6713 100644 --- a/app/graphql/types/merge_request_type.rb +++ b/app/graphql/types/merge_request_type.rb @@ -55,12 +55,27 @@ module Types field :web_url, GraphQL::STRING_TYPE, null: true # rubocop:disable Graphql/Descriptions field :upvotes, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions field :downvotes, GraphQL::INT_TYPE, null: false # rubocop:disable Graphql/Descriptions - field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false # rubocop:disable Graphql/Descriptions field :head_pipeline, Types::Ci::PipelineType, null: true, method: :actual_head_pipeline # rubocop:disable Graphql/Descriptions field :pipelines, Types::Ci::PipelineType.connection_type, # rubocop:disable Graphql/Descriptions resolver: Resolvers::MergeRequestPipelinesResolver + field :milestone, Types::MilestoneType, description: 'The milestone this merge request is linked to', + null: true, + 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: 'The list of assignees for the merge request' + field :participants, Types::UserType.connection_type, null: true, complexity: 5, description: 'The list of participants on the merge request' + field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5, + description: 'Boolean flag for whether the currently logged in user is subscribed to this MR' + field :labels, Types::LabelType.connection_type, null: true, complexity: 5, description: 'The list of labels on the merge request' + field :discussion_locked, GraphQL::BOOLEAN_TYPE, description: 'Boolean flag determining if comments on the merge request are locked to members only', + null: false, + resolve: -> (obj, _args, _ctx) { !!obj.discussion_locked } + field :time_estimate, GraphQL::INT_TYPE, null: false, description: 'The time estimate for the merge request' + field :total_time_spent, GraphQL::INT_TYPE, null: false, description: 'Total time reported as spent on the merge request' + field :reference, GraphQL::STRING_TYPE, null: false, method: :to_reference, description: 'Internal merge request reference. Returned in shortened format by default' do + argument :full, GraphQL::BOOLEAN_TYPE, required: false, default_value: false, description: 'Boolean option specifying whether the reference should be returned in full' + end field :task_completion_status, Types::TaskCompletionStatus, null: false # rubocop:disable Graphql/Descriptions end end |