We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b4f40d commit 61de772Copy full SHA for 61de772
src/types/queue/Queue.durationAvg.ts
@@ -8,7 +8,7 @@ export function createDurationAvgFC(
8
opts: Options
9
): ObjectTypeComposerFieldConfigDefinition<any, any> {
10
return {
11
- type: 'Int!',
+ type: 'String!',
12
args: {
13
limit: {
14
type: 'Int',
@@ -20,15 +20,15 @@ export function createDurationAvgFC(
20
let amount = 0;
21
let counter = 0;
22
if (jobs.length === 0) {
23
- return 0;
+ return '0';
24
} else {
25
for (const job of jobs) {
26
if (job?.finishedOn && job?.processedOn) {
27
amount += job.finishedOn - job.processedOn;
28
counter++;
29
}
30
31
- return (amount / (counter || 1)).toFixed(0);
+ return String((amount / (counter || 1)).toFixed(0));
32
33
},
34
};
0 commit comments