Prisma find many undefined

Hello, In my other projet when i do prisma.resource.findMany({select: ...}) the type is {id: string, createdAt: Date}[] but in a new project ( created just now with T3 ) when i do the same thing i got {id: string | undefined, createdAt: Date | undefined}[]
Solution:
Hello, In my other projet when i do prisma.resource.findMany({select: ...}) the type is {id: string, createdAt: Date}[] but in a new project ( created just now with T3 ) when i do the same thing i got {id: string | undefined, createdAt: Date | undefined}[]...
Jump to solution
2 Replies
whatplan
whatplan2y ago
Try regenerating your prisma client with prisma db push or npm i
Meyer
MeyerOP2y ago
Hello, is just because I used select variables like : const select: Prisma.ResourceSelect but I need to use Prisma validator to fix this type problem
Want results from more Discord servers?
Add your server