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

17 lines
403 B
Ruby

# frozen_string_literal: true
module Resolvers
class WorkItemResolver < BaseResolver
include Gitlab::Graphql::Authorize::AuthorizeResource
authorize :read_work_item
type Types::WorkItemType, null: true
argument :id, ::Types::GlobalIDType[::WorkItem], required: true, description: 'Global ID of the work item.'
def resolve(id:)
authorized_find!(id: id)
end
end
end