prisma-nestjs-graphql icon indicating copy to clipboard operation
prisma-nestjs-graphql copied to clipboard

Excessive stack depth comparing types

Open terravisit opened this issue 2 years ago • 2 comments

Description: I encountered an error while using the "prisma-nestjs-graphql" generator that resulted in an "Excessive stack depth comparing types" error. This error prevents nestjs from starting correctly.

Steps to reproduce:

  1. Clone the test repository: repo-test
  2. Follow the installation instructions in the README to set up the project.
  3. Run the project and trigger the scenario that causes the error.
  4. See the "Excessive stack depth comparing types" error in the console.

Expected behavior: I expected the nestjs start without any error in the console

Additional information:

  • Version of the "prisma-nestjs-graphql" generator: ^18.0.2
  • Operating system: windows
  • Prisma version: ^4.15.0
  • NestJS version: ^9.0.0

I think the problem comes from typescript, it's certainly not a problem in the code itself. Strange thing:

  • I transform the type SupplierUpdateInput in the file app.service.ts into any.
  • I save, the server starts without errors
  • I change the type back to SupplierUpdateInput and save again, the server starts without error too.

So it seems to me that the problem is only with server startup. Of course, in a real project, transforming types into any everywhere in the code and putting them back is not an option.

Reproducible repository: I have created a test repository where the issue can be reproduced. You can find it here: repo-test

terravisit avatar Jul 14 '23 22:07 terravisit

Resolved here : https://github.com/microsoft/TypeScript/issues/55027#issuecomment-1636646632

terravisit avatar Jul 15 '23 03:07 terravisit

Related https://github.com/unlight/prisma-nestjs-graphql/issues/65

unlight avatar Jul 15 '23 14:07 unlight