Welcome to mirror list, hosted at ThFree Co, Russian Federation.

destroy.rb « timeline_event « incident_management « mutations « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 728a2e7c0d67dc99ca7b24fac9091098dec226ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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