gitlab-org--gitlab-foss/app/graphql/resolvers/project_packages_resolver.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
496 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# rubocop: disable Graphql/ResolverType
module Resolvers
class ProjectPackagesResolver < PackagesBaseResolver
# The GraphQL type is defined in the extended class
def resolve(sort:, **filters)
return unless packages_available?
params = filters.merge(SORT_TO_PARAMS_MAP.fetch(sort))
params[:preload_pipelines] = false
::Packages::PackagesFinder.new(object, params).execute
end
end
end
# rubocop: enable Graphql/ResolverType