Skip to content

Help, generated Prisma shape mismatches with Prisma Client type #1193

Answered by hayes
2coo asked this question in Q&A
Discussion options

You must be logged in to vote

It should be possible to entirely infer the generated types from the prisma client instead. The first versions of the prisma plugin worked this way. It ended up causing type-checking performance problems, and generating the types was the easiest way to get types that would be efficient for type-checking, but I don't think there is something that would prevent creating a type like: PrismaTypesFromClient<typeof prisma> that could be used instead of the generated types.

There are some relevant examples of extracting types from the client here: prisma/prisma#5315 (comment). I'd be open adding a utility type for this to the plugin, but I'm not sure I have time right now to prioritize it. If yo…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@hayes
Comment options

Answer selected by 2coo
@hayes
Comment options

@hayes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants