Skip to content

Commit

Permalink
fix: pothos support total
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymaycry committed Feb 8, 2024
1 parent 2e0607c commit 7c5ada0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/dataprovider/src/getResponseParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
};

Expand Down

0 comments on commit 7c5ada0

Please sign in to comment.