typegraphql-prisma icon indicating copy to clipboard operation
typegraphql-prisma copied to clipboard

_count resolver breaks when moving from Prisma 4 to Prisma 5

Open KrishnaPravin opened this issue 1 year ago • 1 comments
trafficstars

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):

  • OS: macOS Ventura
  • Node 19
  • typegraphql-prisma version 0.27.1
  • Prisma version 5.7.0
  • TypeScript version 4.8.3

Additional Context Is this a known case?

KrishnaPravin avatar Dec 14 '23 11:12 KrishnaPravin

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

KrishnaPravin avatar Dec 15 '23 06:12 KrishnaPravin