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

`@core/zod` and Prisma preview features #337

Closed keanugrieves closed 1 year ago

keanugrieves commented 1 year ago

Description and expected behavior These are also unaddressed issues in the underlying libraries:

fullTextSearch

fullTextSearch

In the first screenshot, Company.schema.ts should import CompanyOrderByWithRelationAndSearchRelevanceInputObjectSchema from ./objects/CompanyOrderByWithRelationAndSearchRelevanceInput.schema.

The error might stem from these lines: https://github.com/zenstackhq/zenstack/blob/19253ca3ddc34c748cb3271e13cd0d5d09f4c194/packages/plugins/trpc/src/zod/transformer.ts#L403-L421

fieldReference

fieldReference

This schema isn't generated at all, although there's an unmerged pull request that might provide some clues: https://github.com/Brettm12345/prisma-zod-generator/commit/8b1d50be7c82844bc8b1928d2cdf354461ed2ea6

Environment (please complete the following information):

Additional context Add any other context about the problem here.

ymc9 commented 1 year ago

Thanks for filing this @keanugrieves ! Yes, there're still several unresolved issues related to Prisma preview features. We should probably allocate the next iteration to focus on fixing them.