trcp sub routes?

Dose anyone know how to create subrouters? for example with sudo code.
export const watchlistRouter = createTRPCRouter({
createDefaultWatchListConfig,
createWatchListConfig,
getUserWatchListConfigsLists,
getUserWatchListConfig,
deleteWatchListConfig,

StockChartContentItemRouter: {
// sub routes here
}
})
export const watchlistRouter = createTRPCRouter({
createDefaultWatchListConfig,
createWatchListConfig,
getUserWatchListConfigsLists,
getUserWatchListConfig,
deleteWatchListConfig,

StockChartContentItemRouter: {
// sub routes here
}
})
Solution:
nvm I see that I can do
export const stockChartContentItemRouter = createTRPCRouter({
createStockChartContentItem,
// stockChartContentItem
});
export const stockChartContentItemRouter = createTRPCRouter({
createStockChartContentItem,
// stockChartContentItem
});
and nest that in side another router....
Jump to solution
1 Reply
Solution
Max
Max14mo ago
nvm I see that I can do
export const stockChartContentItemRouter = createTRPCRouter({
createStockChartContentItem,
// stockChartContentItem
});
export const stockChartContentItemRouter = createTRPCRouter({
createStockChartContentItem,
// stockChartContentItem
});
and nest that in side another router.
Want results from more Discord servers?
Add your server