MichalLytek / typegraphql-prisma

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

_count resolver breaks when moving from Prisma 4 to Prisma 5 #428

Open KrishnaPravin opened 11 months ago

KrishnaPravin commented 11 months ago

Describe the Bug I've upgraded Prisma version from 4.x to 5.x. The typescript check for _count resolver now fails with missing methods. There are required methods being generated for all the ModelCount classes.

Expected Behavior Methods in the ModelCount class should be optional, so that the return type of the _count resolver does not have to have methods in it.

Logs ...is missing the following properties from type 'UserCount': getPosts,...

Environment (please complete the following information):

Additional Context Is this a known case?

KrishnaPravin commented 11 months ago

@MichalLytek Thank you for tagging, can I expect a fix?