blob: fa68593eb090e32681741627c18de740b8a0018f (
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
25
26
27
28
29
30
31
32
|
# frozen_string_literal: true
module Mutations
module Ci
module PipelineTrigger
class Update < Base
graphql_name 'PipelineTriggerUpdate'
argument :description, GraphQL::Types::String,
required: true,
description: 'Description of the pipeline trigger token.'
field :pipeline_trigger, Types::Ci::PipelineTriggerType,
null: true,
description: 'Mutated pipeline trigger token.'
def resolve(id:, description:)
trigger = authorized_find!(id: id)
trigger.description = description
trigger.save
{
pipeline_trigger: trigger,
errors: trigger.errors.full_messages
}
end
end
end
end
end
|