debian-mirror-gitlab/app/graphql/resolvers/packages_resolver.rb

20 lines
354 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module Resolvers
class PackagesResolver < BaseResolver
type Types::PackageType, null: true
def resolve(**args)
return unless packages_available?
::Packages::PackagesFinder.new(object).execute
end
private
def packages_available?
::Gitlab.config.packages.enabled
end
end
end