PrismaP
Prisma16mo ago
30 replies
Txt

NestJs + Prisma Optimize

Hello everyone!

I would like to ask if anyone has managed to integrate a NestJs server with the Optimize tool and how.

I have tried this instantiation part in a few ways

const prisma = new PrismaClient().$extends(
withOptimize({ apiKey: process.env.OPTIMIZE_API_KEY }),
);


such as adding it to the prismaService, using useValue and useFactory in the module and even instantiating it in the function that performs the query.

I receive the return log that Optimize is connected "See your Optimize dashboard at: https://optimize.prisma.io", and it does not display any errors, but no information about any query made to the Optimize platform is received.

versions
"@prisma/client": "^5.20.0",
"@prisma/extension-optimize": "^1.0.1",
Was this page helpful?