Is your feature request related to a problem? Please describe.
Not a problem but a missing feature and a good opportunity
Describe the solution you'd like
I'm heavily using the zenstack/zod package for generating my orpc input/output schemas. Now I want also to have dynamic filtering in my input schemas. Therefore I require a function that will generate a zod schema that will do the following:
factory.makeModelQuerySchema("MODEL_NAME", "FUNCTION_NAME", options)
FUNCTION_NAME could be findMany, findFirst, etc.
and maybe allow in options to restrict some fields (for example passwordHash field, etc.) in options.
Additionally then a output schema could be inferred of this? That would be excellent! Because when the input schema is present theoretically the output schema can also be inferred for maximum type-safety.
Describe alternatives you've considered
Building a solution myself but I think many others would also like this really much.
Additional context
Nothing.
Is your feature request related to a problem? Please describe.
Not a problem but a missing feature and a good opportunity
Describe the solution you'd like
I'm heavily using the
zenstack/zodpackage for generating my orpc input/output schemas. Now I want also to have dynamic filtering in my input schemas. Therefore I require a function that will generate a zod schema that will do the following:FUNCTION_NAME could be
findMany,findFirst, etc.and maybe allow in options to restrict some fields (for example
passwordHashfield, etc.) inoptions.Additionally then a output schema could be inferred of this? That would be excellent! Because when the input schema is present theoretically the output schema can also be inferred for maximum type-safety.
Describe alternatives you've considered
Building a solution myself but I think many others would also like this really much.
Additional context
Nothing.