debian-mirror-gitlab/app/graphql/mutations/incident_management/timeline_event/destroy.rb
2022-07-17 14:43:12 +02:00

24 lines
616 B
Ruby

# frozen_string_literal: true
module Mutations
module IncidentManagement
module TimelineEvent
class Destroy < Base
graphql_name 'TimelineEventDestroy'
argument :id, Types::GlobalIDType[::IncidentManagement::TimelineEvent],
required: true,
description: 'Timeline event ID to remove.'
def resolve(id:)
timeline_event = authorized_find!(id: id)
response ::IncidentManagement::TimelineEvents::DestroyService.new(
timeline_event,
current_user
).execute
end
end
end
end
end