Prisma dosn't support enums out of the box and this project shows a way to set up enum like behaviors in your Epic Stack application. Video of what I did.
I also left comments in the code to describe what and why I did to get the enum to work in the project.
Pretty much to enable the feature flag in the prisma.schema
you need to add the clientExtensions
feature flag to your generator
block as in below.
generator client {
provider = "prisma-client-js"
previewFeatures = ["clientExtensions"]
}
Then run the generate command
npx prisma generate
Now you're good to go to create and use your extension!
Prisma Docs to learn more on client extensions in your project. I found these helpful.
Matt Pocock 'splaining the TypesScrip magic that is taking place.
I hope this helps! Have a great day!