cal.pub0.org/server/routers/_app.ts

29 lines
802 B
TypeScript
Raw Normal View History

/**
* This file contains the root router of your tRPC-backend
*/
import { createRouter } from "../createRouter";
2021-09-27 16:09:19 +00:00
import { bookingRouter } from "./booking";
import { viewerRouter } from "./viewer";
/**
* Create your application's root router
* If you want to use SSG, you need export this
* @link https://trpc.io/docs/ssg
* @link https://trpc.io/docs/router
*/
export const appRouter = createRouter()
/**
* Add data transformers
* @link https://trpc.io/docs/data-transformers
*/
// .transformer(superjson)
/**
* Optionally do custom error (type safe!) formatting
* @link https://trpc.io/docs/error-formatting
*/
// .formatError(({ shape, error }) => { })
2021-09-27 16:09:19 +00:00
.merge("viewer.", viewerRouter)
.merge("booking.", bookingRouter);
export type AppRouter = typeof appRouter;