Skip to content

Commit

Permalink
Merge pull request #141 from panter/fix/pothos-support-total
Browse files Browse the repository at this point in the history
fix: pothos support total
  • Loading branch information
jaymaycry authored Feb 8, 2024
2 parents 2e0607c + 7c5ada0 commit 381f5eb
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 381f5eb

Please sign in to comment.