Hey Yassin 👋 this is a great initiative and I'd love to see such a guide that makes it easier for the community to build their own generators!!

However, there's a major caveat to this. The DMMF is an undocumented API that's not considered part of the official API surface and might break unexpectedly with any release, so it's very intentionally not documented in our own resources (somewhat related context also in this issue: #10725).

I would still love to see such a guide, do you maybe have a personal blog where you could publish it? Otherwise, platforms like Hashnode or dev.to are great to publish blog posts without the need of setting up your own blog. While we are not able to include such a guide in our own resources, I do think we can link to it from the Community generators-section in our docs!

🌐
npm
npmjs.com › package › @prisma › generator-helper
prisma/generator-helper
July 3, 2025 - ⚠️ Warning: This package is intended for Prisma's internal use. Its release cycle does not follow SemVer, which means we might release breaking changes (change APIs, remove functionality) without any prior warning. If you are using this package, it would be helpful if you could help us gain an understanding where, how and why you are using it. Your feedback will be valuable to us to define a better API. Please share this information at https://github.com/prisma/prisma/discussions/13877 - Thanks!
      » npm install @prisma/generator-helper
    
Published   Apr 22, 2026
Version   7.8.0
Discussions

Can I use prisma types at backend in client?
You could just make a monorepo and import types from prisma. I don't recommend it, but it's possible this way. More on reddit.com
🌐 r/typescript
5
1
August 16, 2023
How the F**** does anyone use Prisma in production?

My company has been using Prisma in production for just over 2 years. We've definitely ran into pain points such as the lack of support for long-running transactions, but it provides an intuitive type-safe API for data access that makes iteration fast and easy. Plus, the tooling around GraphQL (namely Nexus) integrates really well in our stack. For 90% of our use cases Prisma does the job very well; for the other 10% we use a library called Slonik to roll our own SQL queries. So to answer the question in the title of this post, we use Prisma where it's convenient to do so, and then raw SQL with Slonik when we need more advanced functionality.

More on reddit.com
🌐 r/node
89
124
April 2, 2021
NestJS + Prisma.. confusion about DTOs and the generated types
Hey 👋, Tasin from Prisma here. Answer to your questions Sure many generated types can be used, but a manual DTO creation can't be avoided completely right? You're correct. In general, Prisma defines data types for your data layer. For DTOs in NestJS, you're typically defining the types for your application layer. There might be a strong overlap between the two, but they might not necessarily be a one-to-one mapping. I would personally suggest defining the DTOs manually. How are you managing this in your project: Any tricks on how I can avoid to now create all the DTOs manually for sending data back to the backend? Note that there are some libraries like this one that can help generate DTOs for you. Personally I just write them manually but feel free to use libraries like this. Usually they thought about everything in the docs, has this been forgotten as it's quite common to exclude fields or am I missing something? This is not currently supported by Prisma. There's a github feature request for this. Note that there are some workarounds in the prisma docs . How to elegantly omit a field like a password from your NestJS API For your use case, I would suggest omitting the field using the NestJS Class serialization interceptor instead of removing it at the service level. Here's a quick example of the remove password from the User object case. First, define a UserEntity and annotate the password field with Exclude() so the field is removed during serialization. import { Exclude } from 'class-transformer'; export class UserEntity { // If you have a Prisma `User` type with the same fields, this entity can `implement` the `User` type from '@prisma/client' if you want to reuse Prisma-generated types. id: string; firstName: string; lastName: string; @Exclude() // will remove this field during serialization password: string; constructor(partial: Partial) { Object.assign(this, partial); } } Let's say you have a UserService with a findAll and findOne method: @Injectable() export class UsersService { constructor(private prismaService: PrismaService) {} // These functions return the Prisma User types, with the password included. findOne(id: string): Promise { return this.prismaService.user.findUnique({ where: { id } }); } async findAll(): Promise { return this.prismaService.user.findMany({}); } } Inside the controller, you can define the corresponding route handlers like this: @Controller('users') export class UsersController { @Get(':id') async findOne(@Param('id') id: string) { return new UserEntity(await this.usersService.findOne(id)); } @Get() async findAll() { const users = await this.usersService.findAll(); return users.map((user) => new UserEntity(user)); } } You can globally bind the ClassSerializationInterceptor by adding this line to your main.ts async function bootstrap() { const app = await NestFactory.create(AppModule); app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector))); await app.listen(3000); } bootstrap(); Hope this helps! By the way, I'm currently writing a tutorial series about using NestJS and Prisma in the Prisma Blog . The first article shows how to create a basic CRUD REST API. We hope to cover a lot of topics (just like the use case you are talking about in this post) and show best practices in the upcoming articles. I would def suggest checking it out! More on reddit.com
🌐 r/Nestjs_framework
20
20
June 23, 2022
What makes prisma is getting more successful and popular than TypeORM and sequelize?
TypeORM maintainers don't want to improve it at all, just keep it stable Prisma has huge issues but at least they're willing to improve More on reddit.com
🌐 r/node
77
54
June 7, 2023
🌐
DEV Community
dev.to › yassineldeeb › create-prisma-generator-2mdg
Create Prisma Generator - DEV Community
January 11, 2022 - When @prisma/sdk spawns our generator, It uses RPCs to communicate with our generator to send it the parsed datamodel AST as an example. Luckily for us, prisma has wrote a helper library called @prisma/generator-helper.
🌐
Pub.dev
pub.dev › documentation › prisma_generator_helper › latest › prisma.generator_helper
prisma.generator_helper library - Dart API
Prisma generator helper. BinaryPaths · @see https://github.com/prisma/prisma/blob/main/packages/generator-helper/src/types.ts#L77 · BinaryTargetsEnvValue · @see https://github.com/prisma/prisma/blob/main/packages/generator-helper/src/types.ts#L49 · DataSource ·
🌐
GitHub
github.com › prisma-korea › prisma-generator-proto
GitHub - prisma-korea/prisma-generator-proto: Simple demonstration of @prisma/generator-helper
Simple demonstration of @prisma/generator-helper. Contribute to prisma-korea/prisma-generator-proto development by creating an account on GitHub.
Starred by 5 users
Forked by 2 users
Languages   TypeScript 79.5% | JavaScript 20.5% | TypeScript 79.5% | JavaScript 20.5%
🌐
GitHub
github.com › prisma › prisma › blob › main › packages › generator-helper › src › dmmf.ts
prisma/packages/generator-helper/src/dmmf.ts at main · prisma/prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB - prisma/packages/generator-helper/src/dmmf.ts at main · prisma/prisma
Author   prisma
🌐
Prisma
prisma.io › home › generators › generators › generators › generators
Generators (Reference) | Prisma Documentation
@pegasusheavy/nestjs-prisma-graphql: Generates NestJS GraphQL types from your Prisma schema. ESM-first with support for Prisma 7+. Edit on GitHub · Data sources · Data sources enable Prisma to connect to your database. This page explains how to configure data sources in your Prisma schema ·
Find elsewhere
🌐
GitHub
github.com › multipliedtwice › prisma-generator-express
GitHub - multipliedtwice/prisma-generator-express: This tool automatically generates Express/Fastify CRUD API that uses Prisma to handle database operations and validates responses with Zod schemas to ensure the integrity of input and output. · GitHub
May 11, 2026 - This tool automatically generates Express/Fastify CRUD API that uses Prisma to handle database operations and validates responses with Zod schemas to ensure the integrity of input and output. - multipliedtwice/prisma-generator-express
Starred by 28 users
Forked by 6 users
Languages   TypeScript 86.2% | JavaScript 13.8%
🌐
GitHub
github.com › topics › prisma-generator
prisma-generator · GitHub Topics · GitHub
February 22, 2021 - Prisma generator for automatically generating documentation reference from the Prisma schema.
🌐
GitHub
github.com › odroe › prisma-generator-helper
GitHub - medz/napi-dart · GitHub
Contribute to medz/napi-dart development by creating an account on GitHub.
Author   medz
🌐
GitHub
github.com › YassinEldeeb › create-prisma-generator
GitHub - YassinEldeeb/create-prisma-generator: Get started developing your own ◭ Prisma generator by running a single command.
Get started developing your own ◭ Prisma generator by running a single command. - GitHub - YassinEldeeb/create-prisma-generator: Get started developing your own ◭ Prisma generator by running a single command.
Starred by 195 users
Forked by 8 users
Languages   TypeScript 84.3% | JavaScript 15.2% | Shell 0.5% | TypeScript 84.3% | JavaScript 15.2% | Shell 0.5%
🌐
Prisma
prisma.io › home › generating prisma client › generating prisma client › generating prisma client › generating prisma client
Generating Prisma Client | Prisma Documentation
Prisma CLI reference for generate · Edit on GitHub · Introduction to Prisma Client · Learn how to set up and configure Prisma Client in your project · Custom model and field names · Learn how you can decouple the naming of Prisma models from database tables to improve the ergonomics of the generated Prisma Client API ·
🌐
GitHub
gist.github.com › jjhiggz › a862dfcbc7f1ffe2027a54afce996ada
Prisma Effect Generator · GitHub
I've changed it a little bit and published it here https://www.npmjs.com/package/effect-prisma-generator
🌐
GitHub
github.com › Passionfroot › prisma-generator-zero
GitHub - Passionfroot/prisma-generator-zero: A Prisma generator for generating Zero schema with ease · GitHub
prisma-generator-zero is a generator for prisma that generates a Zero schema from your Prisma schema.
Starred by 38 users
Forked by 4 users
Languages   TypeScript
🌐
Prisma
prisma.io › home › introduction to prisma client › introduction to prisma client › introduction to prisma client › introduction to prisma client
Introduction to Prisma Client | Prisma Documentation
bunx prisma generate · Edit on GitHub · Prisma Client · Prisma Client is Prisma ORM's generated, type-safe query builder for Node.js, Bun, and Deno applications. Generating Prisma Client · Learn when and how to run prisma generate, configure ...
🌐
GitHub
github.com › kimjbstar › prisma-class-generator
GitHub - kimjbstar/prisma-class-generator: Class generator from Prisma schema. · GitHub
Class generator from Prisma schema. Contribute to kimjbstar/prisma-class-generator development by creating an account on GitHub.
Starred by 190 users
Forked by 57 users
Languages   TypeScript 99.9% | JavaScript 0.1%
🌐
Yarn
yarnpkg.com › package
Yarn
Cannot read properties of null (reading 'startsWith')
🌐
npm
npm.io › home › @prisma/generator-helper
@prisma/generator-helper | npm.io
October 4, 2019 - bun add @prisma/generator-helper · Built and signed on · GitHub ActionsView build summary · Source Commit · github.com/prisma/prisma@a6d0155 · Build File · .github/workflows/release.yml · Public Ledger · Transparency log entry · TSCJS · B75/100 · active · Ships TypeScript types ·
Published   Oct 04, 2019
Version   7.9.0
Author   Tim Suchanek
🌐
GitHub
github.com › omar-dulaimi › prisma-zod-generator
GitHub - omar-dulaimi/prisma-zod-generator: Prisma 2+ generator to emit Zod schemas from your Prisma schema · GitHub
Prisma 2+ generator to emit Zod schemas from your Prisma schema - omar-dulaimi/prisma-zod-generator
Starred by 824 users
Forked by 77 users
Languages   TypeScript 95.2% | JavaScript 3.1% | CSS 1.6% | Shell 0.1%