We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b1a955 commit a484defCopy full SHA for a484def
src/types/job/Job.ts
@@ -3,6 +3,7 @@ import { createStateFC } from './Job.state';
3
import { createRepeatOptionsTC } from './Job.opts.repeat';
4
import { SchemaComposer } from 'graphql-compose';
5
import { Options } from '../../definitions';
6
+import { Job } from 'bullmq';
7
8
export function getJobTC(sc: SchemaComposer<any>, opts: Options) {
9
const { typePrefix, jobDataTC = 'JSON!' } = opts;
@@ -14,7 +15,10 @@ export function getJobTC(sc: SchemaComposer<any>, opts: Options) {
14
15
data: jobDataTC,
16
progress: 'Int',
17
delay: 'Int',
- timestamp: 'Date',
18
+ timestamp: {
19
+ type: 'Date',
20
+ resolve: async (job: Job) => (job.timestamp ? job.timestamp : null),
21
+ },
22
attemptsMade: 'Int',
23
failedReason: 'JSON',
24
stacktrace: '[String]',
0 commit comments