2020-05-24 23:13:21 +05:30
|
|
|
# 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
|
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
argument :id, ::Types::GlobalIDType[::DesignManagement::Version],
|
2020-05-24 23:13:21 +05:30
|
|
|
required: true,
|
2021-10-27 15:23:28 +05:30
|
|
|
description: 'Global ID of the version.'
|
2020-05-24 23:13:21 +05:30
|
|
|
|
|
|
|
def resolve(id:)
|
|
|
|
authorized_find!(id: id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|