Not too sure what's going on here, but it seems that the transaction closes when running a prisma query sequentially with using prisma's transaction client for kysely. For example:
Specifically, the following error specifies that the queryRaw invocation by kysely is performed on a closed transaction:
TRPCClientError:
Invalid `prisma.$queryRawUnsafe()` invocation:
Transaction API error: Transaction already closed: A query cannot be executed on a committed transaction.
at TRPCClientError.from (webpack-internal:///./node_modules/@trpc/client/dist/TRPCClientError-38f9a32a.mjs:33:20)
at eval (webpack-internal:///./node_modules/@trpc/client/dist/links/httpLink.mjs:45:105)
Not too sure what's going on here, but it seems that the transaction closes when running a prisma query sequentially with using prisma's transaction client for kysely. For example:
Specifically, the following error specifies that the queryRaw invocation by kysely is performed on a closed transaction: