2021-01-14 12:10:54 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class PackageDetailsResolver < BaseResolver
|
2022-09-14 00:10:29 +00:00
|
|
|
extension ::Gitlab::Graphql::Limit::FieldCallCount, limit: 1
|
|
|
|
|
2021-04-09 21:09:22 +00:00
|
|
|
type ::Types::Packages::PackageDetailsType, null: true
|
2021-02-01 15:08:56 +00:00
|
|
|
|
2021-01-14 12:10:54 +00:00
|
|
|
argument :id, ::Types::GlobalIDType[::Packages::Package],
|
|
|
|
required: true,
|
2021-08-19 18:10:32 +00:00
|
|
|
description: 'Global ID of the package.'
|
2021-01-14 12:10:54 +00:00
|
|
|
|
|
|
|
def resolve(id:)
|
|
|
|
GitlabSchema.find_by_gid(id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|