dynamic router creation
has anyone been able to create a dynamic router?
e.g. i pass in the schema and some metadata and it produces the same routes but they are selected down to the metadata?
my use case is i want to have crud against a set of tables...
so i create a zod schema for each entity and want to create a router that does list, get, create, update, and delete, but for that one table, then i create one of each of these one per table...
with what i've written, i'm getting the dreaded ts(2742) error....
trying to pass in the schema as
e.g. i pass in the schema and some metadata and it produces the same routes but they are selected down to the metadata?
my use case is i want to have crud against a set of tables...
so i create a zod schema for each entity and want to create a router that does list, get, create, update, and delete, but for that one table, then i create one of each of these one per table...
with what i've written, i'm getting the dreaded ts(2742) error....
The inferred type of 'routerForTable' cannot be named without a reference to '../../node_modules/@trpc/server/dist/core/parser.js'. This is likely not portable. A type annotation is necessarytrying to pass in the schema as
T extends z.ZodObject<z.ZodRawShape, z.UnknownKeysParam>