MichalLytek / typegraphql-prisma

Prisma generator to emit TypeGraphQL types and CRUD resolvers from your Prisma schema

Home Page:https://prisma.typegraphql.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to add decorators to _count field

subtle-supernova opened this issue · comments

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.