debian-mirror-gitlab/app/graphql/resolvers/design_management/version_resolver.rb
2023-06-20 00:43:36 +05:30

21 lines
511 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
end
end
end