zod-prisma-types icon indicating copy to clipboard operation
zod-prisma-types copied to clipboard

[Feature Request] Create scalar enums of relations when createRelationValuesTypes is true

Open CarterRoll opened this issue 9 months ago • 0 comments

I am attempting to get the list of relations on a model. The createRelationValuesTypes flag could be useful for this, except it only provides types and a Schema. I don't seem to be able to find a simple list of the relations within the schema (this may be an issue on my end with my lack of understanding with Zod, the schema generated is complicated). It would be useful to generate an Enum that contains the relations of the model. It generates this as a type, which doesn't allow me to read the data at runtime.

CarterRoll avatar Mar 04 '25 19:03 CarterRoll