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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
586 B
Ruby
Raw Normal View History

# 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