summaryrefslogtreecommitdiff
path: root/app/graphql/types/ci/pipeline_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/ci/pipeline_type.rb')
-rw-r--r--app/graphql/types/ci/pipeline_type.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/graphql/types/ci/pipeline_type.rb b/app/graphql/types/ci/pipeline_type.rb
index 82a9f8495ce..c508b746317 100644
--- a/app/graphql/types/ci/pipeline_type.rb
+++ b/app/graphql/types/ci/pipeline_type.rb
@@ -26,7 +26,7 @@ module Types
description: 'Detailed status of the pipeline',
resolve: -> (obj, _args, ctx) { obj.detailed_status(ctx[:current_user]) }
field :config_source, PipelineConfigSourceEnum, null: true,
- description: "Config source of the pipeline (#{::Ci::PipelineEnums.config_sources.keys.join(', ').upcase})"
+ description: "Config source of the pipeline (#{::Enums::Ci::Pipeline.config_sources.keys.join(', ').upcase})"
field :duration, GraphQL::INT_TYPE, null: true,
description: 'Duration of the pipeline in seconds'
field :coverage, GraphQL::FLOAT_TYPE, null: true,
@@ -48,6 +48,14 @@ module Types
field :user, Types::UserType, null: true,
description: 'Pipeline user',
resolve: -> (pipeline, _args, _context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, pipeline.user_id).find }
+ field :retryable, GraphQL::BOOLEAN_TYPE,
+ description: 'Specifies if a pipeline can be retried',
+ method: :retryable?,
+ null: false
+ field :cancelable, GraphQL::BOOLEAN_TYPE,
+ description: 'Specifies if a pipeline can be canceled',
+ method: :cancelable?,
+ null: false
end
end
end