vegardit / prisma-generator-nestjs-dto

Generates NestJS DTO classes from Prisma Schema
Apache License 2.0
274 stars 75 forks source link

Generating optional `_count` fields in output entity types #201

Open jagged3dge opened 1 year ago

jagged3dge commented 1 year ago

Has anyone managed to add generating a typed _count optional field for entities generated by this tool?

I've been trawling the forks of this repo, and haven't seen anything to support this so far.

It would be really nice to have this feature. I want to attempt this on my fork, but I need some pointers. The Prisma Client generates typing for the _count field as a part of [model]GetPayload. I'm not sure how to go about incorporating this into the final entity type generation.

Any pointers in the right direction are absolutely welcome. Thanks in advance!