debian-mirror-gitlab/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

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
def find_object(id:)
2021-01-29 00:20:46 +05:30
GitlabSchema.find_by_gid(id)
2020-05-24 23:13:21 +05:30
end
end
end
end