debian-mirror-gitlab/app/graphql/resolvers/design_management/version_resolver.rb
2022-07-16 19:58:13 +02:00

25 lines
586 B
Ruby

# frozen_string_literal: true
module Resolvers
module DesignManagement
class VersionResolver < BaseResolver
include Gitlab::Graphql::Authorize::AuthorizeResource
type Types::DesignManagement::VersionType, null: true
authorize :read_design
argument :id, ::Types::GlobalIDType[::DesignManagement::Version],
required: true,
description: 'Global ID of the version.'
def resolve(id:)
authorized_find!(id: id)
end
def find_object(id:)
GitlabSchema.find_by_gid(id)
end
end
end
end