P
Prisma7mo ago
Florian

Extra query into object (GetPayload)

I want to extract this query into an object so I can reuse it in different places. But something is wrong with my UserPostData declaration, because it is missing some fields.
No description
3 Replies
Florian
FlorianOP7mo ago
Ok, I think I figured it out. I need to use Prisma.validator as described here: https://stackoverflow.com/questions/68366105/get-full-type-on-prisma-client
Stack Overflow
get full type on prisma client
When i generate my prisma client with prisma generate, i got an index.d.ts with all types from my database. But the probleme is that all type are "single" and there is no relations. When i
David
David7mo ago
You can use const name = {} satisfies Prisma.Type if you are above TS 4.9
Florian
FlorianOP7mo ago
thank you
Want results from more Discord servers?
Add your server