diff options
Diffstat (limited to 'app/graphql/types/ci/job_type.rb')
-rw-r--r-- | app/graphql/types/ci/job_type.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/graphql/types/ci/job_type.rb b/app/graphql/types/ci/job_type.rb index 0ee1ad47b62..feaff4e81d8 100644 --- a/app/graphql/types/ci/job_type.rb +++ b/app/graphql/types/ci/job_type.rb @@ -6,6 +6,9 @@ module Types class JobType < BaseObject graphql_name 'CiJob' + field :pipeline, Types::Ci::PipelineType, null: false, + description: 'Pipeline the job belongs to', + resolve: -> (build, _, _) { Gitlab::Graphql::Loaders::BatchModelLoader.new(::Ci::Pipeline, build.pipeline_id).find } field :name, GraphQL::STRING_TYPE, null: true, description: 'Name of the job' field :needs, JobType.connection_type, null: true, |