blob: 04840ac43bd821d586c0cd9f0a1cd7c96de3fd9a (
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
33
34
35
36
37
|
# frozen_string_literal: true
module Mutations
module AlertManagement
module HttpIntegration
class Create < HttpIntegrationBase
include FindsProject
graphql_name 'HttpIntegrationCreate'
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'Project to create the integration in.'
argument :name, GraphQL::Types::String,
required: true,
description: 'Name of the integration.'
argument :active, GraphQL::Types::Boolean,
required: true,
description: 'Whether the integration is receiving alerts.'
def resolve(args)
project = authorized_find!(args[:project_path])
response ::AlertManagement::HttpIntegrations::CreateService.new(
project,
current_user,
http_integration_params(project, args)
).execute
end
end
end
end
end
Mutations::AlertManagement::HttpIntegration::Create.prepend_mod_with('Mutations::AlertManagement::HttpIntegration::Create')
|