-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathweb-scan-result.js
More file actions
27 lines (25 loc) · 963 Bytes
/
web-scan-result.js
File metadata and controls
27 lines (25 loc) · 963 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
import { GraphQLObjectType } from 'graphql'
import { tlsResultType } from './tls-result'
import { webConnectionResultType } from './web-connection-result'
import { GraphQLDateTime } from 'graphql-scalars'
export const webScanResultType = new GraphQLObjectType({
name: 'WebScanResult',
fields: () => ({
timestamp: {
type: GraphQLDateTime,
description: `The time when the scan was initiated.`,
resolve: ({ timestamp }) => new Date(timestamp),
},
tlsResult: {
type: tlsResultType,
description: `The result for the TLS scan for the scanned server.`,
resolve: async ({ tlsResult }) => tlsResult,
},
connectionResults: {
type: webConnectionResultType,
description: `The result for the HTTP connection scan for the scanned server.`,
resolve: async ({ connectionResults }) => connectionResults,
},
}),
description: `Results of TLS and HTTP connection scans on the given domain.`,
})