gitlab-org--gitlab-foss/app/graphql/resolvers/design_management/version_resolver.rb

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