forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest-scan.js
More file actions
33 lines (31 loc) · 918 Bytes
/
request-scan.js
File metadata and controls
33 lines (31 loc) · 918 Bytes
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
const { GraphQLString } = require('graphql')
const { mutationWithClientMutationId } = require('graphql-relay')
const { ScanTypeEnums } = require('../../enums')
const { Slug } = require('../../scalars')
const requestScan = new mutationWithClientMutationId({
name: 'RequestScan',
description:
'This mutation is used to run a manual scan on a requested domain.',
inputFields: () => ({
urlSlug: {
type: Slug,
description: 'The domain that the scan will be ran on.',
},
scanType: {
type: ScanTypeEnums,
description:
"Type of scan to preform on the requested domain ('WEB' or 'MAIL').",
},
}),
outputFields: () => ({
status: {
type: GraphQLString,
description: 'Informs the user if the scan was dispatched successfully.',
resolve: async () => {},
},
}),
mutateAndGetPayload: async () => {},
})
module.exports = {
requestScan,
}