Menu

Post image 1
Post image 2
1 / 2
0

What is Prisma Client, and why do I have to keep running prisma generate?

DEV Community·Mohamed Idris·24 days ago
#yIj0OZyM
#why#prisma#beginners#menu#schema#recipe
Reading 0:00
15s threshold

If you have been using Prisma and you keep wondering "wait, what is Prisma Client actually?" and "why do I have to run prisma generate every five minutes?", this post is for you. We are going to use one simple analogy that makes the whole thing click. Promise. The kitchen and the menu Imagine you walk into a restaurant. There is a kitchen in the back. The kitchen is where the food actually lives. You cannot just walk in there and grab something. You have to ask for it. There is a recipe book in the kitchen that the chef writes. It says exactly what dishes exist, what is in them, and how they are made. The recipe book is the source of truth. If a dish is not in the recipe book, it does not exist. And there is a menu sitting on your table. The menu is what you read. You point at things on the menu and the kitchen brings them to you. You never see the recipe book. You never go in the kitchen. You just read the menu and order. Got that picture? Good. Now we can map this to Prisma.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More