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

`previewFeatures` blocks generating types #346

Closed cinan closed 1 year ago

cinan commented 1 year ago

Describe the Bug

Hello!

I enabled previewFeatures = ["clientExtensions"] in generator client ... section in schema.prisma file. Now I can't generate typegraphql types, I get this cryptic error:

➜ yarn prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error:
✔ Generated Prisma Client (4.7.1 | library) to ./../../node_modules/@prisma/client in 333ms

Maximum call stack size exceeded

To Reproduce

yarn prisma generate

Expected Behavior

No crash.

Environment (please complete the following information):

Additional Context

As a workaround I first generate typegraphql types without previewFeatures option, then I comment the generator typegraphql and enable previewFeatures and generate again.

MichalLytek commented 1 year ago

See release notes: https://github.com/MichalLytek/typegraphql-prisma/releases/tag/v0.23.1

Adding support for preview features requires small or big changes in the typegraphql prisma generator. Please be patient and wait for it 😉