Gabe O'Leary
10/09/2021, 12:44 AMconst statusResults = await prisma.status.groupBy({
by: ["url"],
where: {
AND: {
userIdStr: {
in: followIds,
},
createdAt: {
gte: startDate,
},
},
},
count: {
url: true,
},
// this orderBy doesn't seem to be working.
orderBy: {
count: {
url: "desc",
},
},
having: {
url: {
count: {
gt: 1,
},
},
},
});
Error:
TSError: ⨯ Unable to compile TypeScript:
script.ts:88:9 - error TS2322: Type '{ count: { url: string; }; }' is not assignable to type 'Enumerable<StatusOrderByInput> | undefined'.
Object literal may only specify known properties, and 'count' does not exist in type 'Enumerable<StatusOrderByInput>'.
I'm attempting to follow the example shown here and can't figure out where I'm going wrong.
Thanks!