zenstackhq / zenstack

Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
https://zenstack.dev
MIT License
2.07k stars 88 forks source link

Zod generation fails when previewFeatures = ["fullTextSearch"] #650

Closed mateus-p closed 1 year ago

mateus-p commented 1 year ago

Description and expected behavior Zod does not generate the "[...]OrderByWithRelationInput.schema" (but tries to import it) when Full Text Search is activated. It seems like Prisma generates a OrderByWithRelationInput type in order to Full Text Search work, but '@core/zod' cannot handle that correctly.

Screenshots image image

Environment:

ymc9 commented 1 year ago

Thanks for filing this @mateus-p . When full-text search is enabled, the reference to OrderByXXX schema needs to use a variant name. I'll fix it in the next release.

ymc9 commented 1 year ago

Fixed in 1.0.0-beta.21