diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/graphql/resolvers/project_pipelines_resolver.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/graphql/resolvers/project_pipelines_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/project_pipelines_resolver.rb | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/app/graphql/resolvers/project_pipelines_resolver.rb b/app/graphql/resolvers/project_pipelines_resolver.rb index 86094c46c2a..0171473a77f 100644 --- a/app/graphql/resolvers/project_pipelines_resolver.rb +++ b/app/graphql/resolvers/project_pipelines_resolver.rb @@ -1,13 +1,28 @@ # frozen_string_literal: true +# The GraphQL type here gets defined in +# https://gitlab.com/gitlab-org/gitlab/blob/master/app/graphql/resolvers/concerns/resolves_pipelines.rb#L7 +# rubocop: disable Graphql/ResolverType module Resolvers class ProjectPipelinesResolver < BaseResolver + include LooksAhead include ResolvesPipelines alias_method :project, :object - def resolve(**args) - resolve_pipelines(project, args) + def resolve_with_lookahead(**args) + apply_lookahead(resolve_pipelines(project, args)) + end + + private + + def preloads + { + jobs: [:statuses], + upstream: [:triggered_by_pipeline], + downstream: [:triggered_pipelines] + } end end end +# rubocop: enable Graphql/ResolverType |