I have a GraphQL server using Node, Knew and Objection.
I have the following in my model:
totalCount = async () => {
const totalCount = await Request
.query()
.count();
console.log(totalCount);
return totalCount;
}
The above is supposed to return an Int but is currently erroring with: "Int cannot represent non 32-bit signed integer value: [object Object]",
The console.log:
[ Request { totalCount: [Function], count: 14 } ]
The number 14 in the console log is correct. How can I get the func above to return an Int with the count?