From b017f8a69c7b6e5e61ca559a851dee300142b013 Mon Sep 17 00:00:00 2001 From: Jan Smolko Date: Wed, 7 Jun 2023 11:22:12 +0200 Subject: [PATCH] fix: fix count fn of Resource --- src/Resource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resource.ts b/src/Resource.ts index 42fce7e..9c622e4 100644 --- a/src/Resource.ts +++ b/src/Resource.ts @@ -66,7 +66,7 @@ export class Resource extends BaseResource { const qb = this.getQueryBuilder(); convertFilter(qb, filter); - const result = await qb.count() as any; + const result = await qb.count({ count: '*' }).first() as any; return result?.count ? Number(result.count) : 0; }