Prisma ORM 8 with NestJS: Injectable Service and Typed Queries
Content is AI-assisted and may contain inaccuracies.
Prisma ORM 8 changes how the client is wired into NestJS: instead of extending a generated PrismaClient class in a service, it exports a plain client object from src/prisma/db.ts. An injectable PrismaService then exposes query helpers as ordinary functions, and the create-prisma template no longer scaffolds a class-based service.
The post, part of a Prisma 8 series, scaffolds a NestJS API on Prisma Postgres, follows a request from controller to database, writes typed queries, and deploys to Prisma Compute. Prisma ORM 8 is currently a release candidate.