Skip to content

Example Remix application to show how to use Prisma Client extensions and setting up enums with Prisma The Epic Stack.

Notifications You must be signed in to change notification settings

L-Steinmacher/epic-stack-with-prisma-client-extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting up Prisma Client extensions for enums in Epic Stack

Why I did this

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!

About

Example Remix application to show how to use Prisma Client extensions and setting up enums with Prisma The Epic Stack.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published