AboudA
Convex Community4mo ago
15 replies
Aboud

batchCount doesn't seem to exist in aggregate?

I'm using
"@convex-dev/aggregate": "^0.1.24"
.

When I query an aggregate...
const counts = await userAggContact.batchCount(ctx, {
      queries: [
        { namespace: user_id },
        { namespace: user_id, bounds: { prefix: ['active'] } },
      ],
    })
,
...I get a Typescript error...
Property 'batchCount' does not exist on type 'TableAggregate<{ Namespace: string; Key: [string, number, number, string]; DataModel: { organizations: { document: { _id: Id<"organizations">; _creationTime: number; color?: string | undefined; auth_id?: string | undefined; ... 20 more ...; allocated_seats: number; }; fieldPaths: ExtractFieldPaths<...> | "_id"; inde...'.


I'm able to query normally (e.g., count, sum), but it seems batchCount doesn't work?
Anyone else encounter this?
Was this page helpful?