File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { createStateFC } from './Job.state';
3
3
import { createRepeatOptionsTC } from './Job.opts.repeat' ;
4
4
import { SchemaComposer } from 'graphql-compose' ;
5
5
import { Options } from '../../definitions' ;
6
+ import { Job } from 'bullmq' ;
6
7
7
8
export function getJobTC ( sc : SchemaComposer < any > , opts : Options ) {
8
9
const { typePrefix, jobDataTC = 'JSON!' } = opts ;
@@ -14,7 +15,10 @@ export function getJobTC(sc: SchemaComposer<any>, opts: Options) {
14
15
data : jobDataTC ,
15
16
progress : 'Int' ,
16
17
delay : 'Int' ,
17
- timestamp : 'Date' ,
18
+ timestamp : {
19
+ type : 'Date' ,
20
+ resolve : async ( job : Job ) => ( job . timestamp ? job . timestamp : null ) ,
21
+ } ,
18
22
attemptsMade : 'Int' ,
19
23
failedReason : 'JSON' ,
20
24
stacktrace : '[String]' ,
You can’t perform that action at this time.
0 commit comments