Extending client not typesafe
I'm working in a NestJS project and need to extend the prisma client to replace all
Date
with string
.
I have this code:
But when using the client, it does not apply the extension types.5 Replies
@Jon Harrell sorry for the ping, do you have any idea?
Changing return type of query extension does not change the return type when calling the function
GitHub
Ability to extend
PrismaClient
class w/ Client Extensions before ...Problem Within NestJS, the common solution to implementing an injectable Prisma Client instance is to extend PrismaClient and add the onModuleInit and enableShutdownHooks functions required by Nest...
we are currently using the following pattern:
@SHG-TV does it return a typesafe controller? I tried it with $allModels $allOperations and it didn't work
when your extension is valid yes. I think you confused the purpose of the method. The $extends method will return a seperate client and will not change the current one.