You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current limitations for generating specs and accessing dynamic parameters:
For generating specs: Instead of requiring dynamic parameters to exist in the .input schema, we can assume they expect a string type when we cannot infer it from the .input schema.
For accessing parameters: We can inject them into the context and access them through a unique symbol:
This draft is still missing some important things:
How RPC stubs works (because RPC has no definitions for params) from client to server
How client works? where to define there params when invoke?
Because .prefix only effect procedure with defined paths inside .route, how does it work in this case?
... Personally, I think this shouldn't be implemented in oRPC. If you require parameters for the entire router, why not put them in the headers? If you still need this kind of feature, you can combine it with a third-party router like Hono for the dynamic params part.
Additional information
Would you be willing to help implement this feature?
Describe the feature
Current limitations for generating specs and accessing dynamic parameters:
For generating specs: Instead of requiring dynamic parameters to exist in the
.inputschema, we can assume they expect astringtype when we cannot infer it from the.inputschema.For accessing parameters: We can inject them into the context and access them through a unique symbol:
Warning
This draft is still missing some important things:
.route, how does it work in this case?Additional information