MichalLytek / typegraphql-prisma

Prisma generator to emit TypeGraphQL types and CRUD resolvers from your Prisma schema
https://prisma.typegraphql.com
MIT License
887 stars 113 forks source link

Ability to add decorators to _count field #429

Open subtle-supernova opened 9 months ago

subtle-supernova commented 9 months ago

Is your feature request related to a problem? Please describe. I cannot add a decorator (ex: Authorized) to the _count meta field. So a _count field will always appear null when auth takes place

Describe the solution you'd like If there were some kind of _count key in modelsEnhanceMap or ModelCount appeared in RelationResolverActionsConfig<"Model">

Describe alternatives you've considered It can be handled on a case by case basis for individual models, but it's tedious and error prone. Maybe I could proxy Authorized in a way I haven't thought of?

Additional context This problem appears on models in relations.