diff options
Diffstat (limited to 'app/graphql/mutations/incident_management/timeline_event_tag/create.rb')
-rw-r--r-- | app/graphql/mutations/incident_management/timeline_event_tag/create.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app/graphql/mutations/incident_management/timeline_event_tag/create.rb b/app/graphql/mutations/incident_management/timeline_event_tag/create.rb new file mode 100644 index 00000000000..14b1d288365 --- /dev/null +++ b/app/graphql/mutations/incident_management/timeline_event_tag/create.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Mutations + module IncidentManagement + module TimelineEventTag + class Create < Base + graphql_name 'TimelineEventTagCreate' + + include FindsProject + + argument :project_path, GraphQL::Types::ID, + required: true, + description: 'Project to create the timeline event tag in.' + + argument :name, GraphQL::Types::String, + required: true, + description: 'Name of the tag.' + + def resolve(project_path:, **args) + project = authorized_find!(project_path) + + response ::IncidentManagement::TimelineEventTags::CreateService.new( + project, current_user, args + ).execute + end + end + end + end +end |