You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am not exactly sure which client or library you're referring to, as this GitHub repository is a monorepo with multiple nestjs-cls related libs, but from the working, I'm going to assume you're talking about an extended Prisma client and the library @nestjs-cls/transactional-adapter-prisma.
Unfortunately, it is not (easily) possible to use an extended client (that is, an another type than the one imported from @prisma/client) with the prisma adapter. I'm planning to add that option to the library, but for the time being, to achieve what you want, you'll have to create a custom adapter.
And basically the only thing that needs changing is the import at the very top(and the related uses) from import { PrismaClient } from '@prisma/client' to import { MyPrismaClient } from '../my/prisma-client.
Also please keep in mind, that since the propagated transaction object is the one that gets passed to prisma.$transaction(( THIS_ONE ) => ...), if you use a custom service that extends the PrismaClient with new class methods, those won't be available on the transaction object.
Hi! Thanks for the lib.
The question is as title. I have extended client (available in ts, or as nest service)
The text was updated successfully, but these errors were encountered: