Zod table+field descriptor generic schema
I'm building a tRPC procedure for listing rows from a table.
I want the user to control the ordering of result by supplying an array of objects with table and the corresponding column name.
This works:
I wanted to create a generic function for constructing the descriptor schema based on provided table:
However, I've stumbled upon the following error:
Which (I think) is related to this.
Any help would be greately apprecieated, as I'm really stuck at this...
0 Replies