From 7c5ada0404b8750127c53af027343a3d75deb253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jay=20P=C3=A9clard?= Date: Thu, 8 Feb 2024 10:44:36 +0100 Subject: [PATCH] fix: pothos support total --- packages/dataprovider/src/getResponseParser.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/dataprovider/src/getResponseParser.ts b/packages/dataprovider/src/getResponseParser.ts index 68c5792..f19d506 100644 --- a/packages/dataprovider/src/getResponseParser.ts +++ b/packages/dataprovider/src/getResponseParser.ts @@ -55,10 +55,12 @@ export default ( const getTotal = () => { switch (queryDialect) { - case "nexus-prisma": - return response.data.total; case "typegraphql": return (response.data.total._count ?? response.data.total.count)._all; + case "nexus-prisma": + case "pothos-prisma": + default: + return response.data.total; } };