Welcome to mirror list, hosted at ThFree Co, Russian Federation.

package_details_resolver.rb « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b77c6b1112bfcdb2415d6ff04998fdd4d5a61f39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Resolvers
  class PackageDetailsResolver < BaseResolver
    extension ::Gitlab::Graphql::Limit::FieldCallCount, limit: 1

    type ::Types::Packages::PackageDetailsType, null: true

    argument :id, ::Types::GlobalIDType[::Packages::Package],
      required: true,
      description: 'Global ID of the package.'

    def resolve(id:)
      GitlabSchema.find_by_gid(id)
    end
  end
end