notiz-dev / nestjs-prisma

Easy Prisma support for your NestJS application
https://nestjs-prisma.dev
MIT License
587 stars 50 forks source link

Use of $extends #64

Closed ikbenignace closed 1 year ago

ikbenignace commented 1 year ago

Hi

I want the service to always extends a specific extension I use

Currently I have to do something like this:

export const prismaClient = globalClient.$extends(
   fieldEncryptionExtension()
 )

Is there a way to do this with this package?

marcjulian commented 1 year ago

Hi @ikbenignace, have a look at the extension example and the docs about how to use Prisma Client Extension with nestjs-prisma. This library supports the use of $extends

https://github.com/notiz-dev/nestjs-prisma/blob/4319bd1cf6f8966b88b353e00778f88652070e55/examples/extensions/src/prisma.extension.ts#L13-L22

marcjulian commented 1 year ago

Closing for now. Please provide more information if you have more questions.