Closed mshumayl closed 1 year ago
Update: The correct solution is to use a global Prisma client.
This has been implemented by create-t3-app
in src\server\api\routers\db.ts
.
So the remaining thing to do is:
import { PrismaClient } from '@prisma/client'
to import { prisma } from '../../db'
.
None of the Prisma Clients are closed automatically. This needs to be handled manually in the tRPC endpoints.