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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/incident_management/timeline_event/update.rb')
-rw-r--r--app/graphql/mutations/incident_management/timeline_event/update.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/graphql/mutations/incident_management/timeline_event/update.rb b/app/graphql/mutations/incident_management/timeline_event/update.rb
new file mode 100644
index 00000000000..1f53bdc19cb
--- /dev/null
+++ b/app/graphql/mutations/incident_management/timeline_event/update.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+module Mutations
+ module IncidentManagement
+ module TimelineEvent
+ class Update < Base
+ graphql_name 'TimelineEventUpdate'
+
+ argument :id, ::Types::GlobalIDType[::IncidentManagement::TimelineEvent],
+ required: true,
+ description: 'ID of the timeline event to update.'
+
+ argument :note, GraphQL::Types::String,
+ required: false,
+ description: 'Text note of the timeline event.'
+
+ argument :occurred_at, Types::TimeType,
+ required: false,
+ description: 'Timestamp when the event occurred.'
+
+ def resolve(id:, **args)
+ timeline_event = authorized_find!(id: id)
+
+ response ::IncidentManagement::TimelineEvents::UpdateService.new(
+ timeline_event,
+ current_user,
+ args
+ ).execute
+ end
+ end
+ end
+ end
+end