Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it clear in docs how to import Prisma Enums #2320

Open
Martinsos opened this issue Oct 4, 2024 · 1 comment
Open

Make it clear in docs how to import Prisma Enums #2320

Martinsos opened this issue Oct 4, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation shouldfix We should do/fix this at some point

Comments

@Martinsos
Copy link
Member

You can import them via @prisma/client but I don't think we mention it anyewhere in the docs? If not, we should.

Inspired by this discord convo: https://discord.com/channels/686873244791210014/1286341107235553420/1286341107235553420 .

@Martinsos Martinsos added documentation Improvements or additions to documentation shouldfix We should do/fix this at some point labels Oct 4, 2024
@infomiho
Copy link
Contributor

infomiho commented Oct 4, 2024

One thing to mention here, you can import enum TS types but not enum values on the client because Prisma Client is a strictly server thing and our full-stack type safety only works with TS types.

User offered his workaround: https://ptb.discord.com/channels/686873244791210014/1286341107235553420/1291501081456676928

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation shouldfix We should do/fix this at some point
Projects
None yet
Development

No branches or pull requests

2 participants