forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategory-totals.js
More file actions
29 lines (28 loc) · 935 Bytes
/
category-totals.js
File metadata and controls
29 lines (28 loc) · 935 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
import { GraphQLObjectType, GraphQLInt } from 'graphql'
export const categoryTotalsType = new GraphQLObjectType({
name: 'CategoryTotals',
description:
'This object displays the total amount of messages that fit into each category.',
fields: () => ({
passSpfOnly: {
type: GraphQLInt,
description: 'Amount of messages that are passing SPF, but failing DKIM.',
resolve: ({ passSpfOnly }) => passSpfOnly,
},
passDkimOnly: {
type: GraphQLInt,
description: 'Amount of messages that are passing DKIM, but failing SPF.',
resolve: ({ passDkimOnly }) => passDkimOnly,
},
fullPass: {
type: GraphQLInt,
description: 'Amount of messages that are passing SPF and DKIM.',
resolve: ({ pass }) => pass,
},
fail: {
type: GraphQLInt,
description: 'Amount of messages that fail both SPF and DKIM.',
resolve: ({ fail }) => fail,
},
}),
})