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
  }
})
Solution
nvm I see that I can do
export const stockChartContentItemRouter = createTRPCRouter({
  createStockChartContentItem,
  // stockChartContentItem
});
and nest that in side another router.
Was this page helpful?