debian-mirror-gitlab/app/graphql/resolvers/project_pipelines_resolver.rb
2021-01-29 00:20:46 +05:30

28 lines
694 B
Ruby

# 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_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