chore: when performing read operations we should use Promise.all, not $transaction (#24084)

This commit is contained in:
Alex van Andel authored and GitHub committed 2025-09-25 17:56:10 +00:00
1 parent 82dfca8272
commit 0ac460fce3
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ export async function getHandler(req: NextApiRequest) {
};
}
const [total, data] = await prisma.$transaction([
const [total, data] = await Promise.all([
prisma.user.count({ where }),
prisma.user.findMany({ where, take, skip }),
]);