forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdkim-selector-result.js
More file actions
69 lines (68 loc) · 2.54 KB
/
Copy pathdkim-selector-result.js
File metadata and controls
69 lines (68 loc) · 2.54 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import { GraphQLInt, GraphQLList, GraphQLObjectType, GraphQLString } from 'graphql'
import { guidanceTagType } from '../../guidance-tag'
export const dkimSelectorResultType = new GraphQLObjectType({
name: 'DKIMSelectorResult',
fields: () => ({
selector: {
type: GraphQLString,
description: `The selector which was scanned.`,
resolve: async ({ selector }) => selector,
},
status: {
type: GraphQLString,
description: `The compliance status for DKIM for the scanned domain.`,
resolve: async ({ status }) => status,
},
record: {
type: GraphQLString,
description: `DKIM record retrieved during scan.`,
resolve: ({ record }) => record,
},
keyLength: {
type: GraphQLString,
description: 'Size of the Public Key in bits.',
resolve: ({ keyLength }) => keyLength,
},
keyType: {
type: GraphQLString,
description: 'Type of DKIM key used.',
resolve: ({ keyType }) => keyType,
},
publicExponent: {
type: GraphQLInt,
description: 'The public exponent used for DKIM.',
resolve: ({ publicExponent }) => publicExponent,
},
keyModulus: {
type: GraphQLString,
description: 'The key modulus used.',
resolve: ({ keyModulus }) => keyModulus,
},
positiveTags: {
type: new GraphQLList(guidanceTagType),
description: `List of positive tags for the scanned domain from this scan.`,
resolve: async ({ positiveTags }, _, { loaders: { loadDkimGuidanceTagByTagId } }) => {
return await loadDkimGuidanceTagByTagId({ tags: positiveTags })
},
},
neutralTags: {
type: new GraphQLList(guidanceTagType),
description: `List of neutral tags for the scanned domain from this scan.`,
resolve: async ({ neutralTags }, _, { loaders: { loadDkimGuidanceTagByTagId } }) => {
return await loadDkimGuidanceTagByTagId({ tags: neutralTags })
},
},
negativeTags: {
type: new GraphQLList(guidanceTagType),
description: `List of negative tags for the scanned domain from this scan.`,
resolve: async ({ negativeTags }, _, { loaders: { loadDkimGuidanceTagByTagId } }) => {
return await loadDkimGuidanceTagByTagId({ tags: negativeTags })
},
},
}),
description: `DomainKeys Identified Mail (DKIM) permits a person, role, or
organization that owns the signing domain to claim some
responsibility for a message by associating the domain with the
message. This can be an author's organization, an operational relay,
or one of their agents.`,
})