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';
33import { createRepeatOptionsTC } from './Job.opts.repeat' ;
44import { SchemaComposer } from 'graphql-compose' ;
55import { Options } from '../../definitions' ;
6+ import { Job } from 'bullmq' ;
67
78export function getJobTC ( sc : SchemaComposer < any > , opts : Options ) {
89 const { typePrefix, jobDataTC = 'JSON!' } = opts ;
@@ -14,7 +15,10 @@ export function getJobTC(sc: SchemaComposer<any>, opts: Options) {
1415 data : jobDataTC ,
1516 progress : 'Int' ,
1617 delay : 'Int' ,
17- timestamp : 'Date' ,
18+ timestamp : {
19+ type : 'Date' ,
20+ resolve : async ( job : Job ) => ( job . timestamp ? job . timestamp : null ) ,
21+ } ,
1822 attemptsMade : 'Int' ,
1923 failedReason : 'JSON' ,
2024 stacktrace : '[String]' ,
You can’t perform that action at this time.
0 commit comments