# Interface: TRPCRootObject<TContext, TMeta, TOptions, $Root>

> 

Defined in: [packages/server/src/unstable-core-do-not-import/initTRPC.ts:64](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/initTRPC.ts#L64)

What `initTRPC.create()` returns: the builders for your procedures,
middlewares and routers. Create it once per backend.

## See

https://trpc.io/docs/server/routers#initialize-trpc

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TContext` *extends* `object` | - |
| `TMeta` *extends* `object` | - |
| `TOptions` *extends* `RuntimeConfigOptions`\<`TContext`, `TMeta`\> | - |
| `$Root` *extends* [`AnyTRPCRootTypes`](https://trpc.io/docs/typedoc/server/index/type-aliases/AnyTRPCRootTypes.md) | `object` |

## Properties

### createCallerFactory

> **createCallerFactory**: [`TRPCRouterCallerFactory`](https://trpc.io/docs/typedoc/server/index/interfaces/TRPCRouterCallerFactory.md)\<`$Root`\>

Defined in: [packages/server/src/unstable-core-do-not-import/initTRPC.ts:128](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/initTRPC.ts#L128)

Creates a factory for callers, which call a router's procedures
directly on the server, without HTTP.

#### See

https://trpc.io/docs/server/server-side-calls

***

### mergeRouters()

> **mergeRouters**: \<`TRouters`\>(...`routerList`) => `MergeRouters`\<`TRouters`\>

Defined in: [packages/server/src/unstable-core-do-not-import/initTRPC.ts:119](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/initTRPC.ts#L119)

Merges routers into one, flattening their procedures into the same
namespace.

#### Type Parameters

| Type Parameter |
| ------ |
| `TRouters` *extends* [`AnyTRPCRouter`](https://trpc.io/docs/typedoc/server/index/type-aliases/AnyTRPCRouter.md)[] |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| ...`routerList` | \[`...TRouters[]`\] |

#### Returns

`MergeRouters`\<`TRouters`\>

#### See

https://trpc.io/docs/server/merging-routers#merging-with-tmergerouters

***

### middleware()

> **middleware**: \<`$ContextOverrides`\>(`fn`) => `MiddlewareBuilder`\<`TContext`, `TMeta`, `$ContextOverrides`, `unknown`\>

Defined in: [packages/server/src/unstable-core-do-not-import/initTRPC.ts:104](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/initTRPC.ts#L104)

Creates a middleware you can reuse across procedures with `.use()`.

#### Type Parameters

| Type Parameter |
| ------ |
| `$ContextOverrides` |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `fn` | `MiddlewareFunction`\<`TContext`, `TMeta`, `object`, `$ContextOverrides`, `unknown`\> |

#### Returns

`MiddlewareBuilder`\<`TContext`, `TMeta`, `$ContextOverrides`, `unknown`\>

#### See

https://trpc.io/docs/server/middlewares

***

### procedure

> **procedure**: [`TRPCProcedureBuilder`](https://trpc.io/docs/typedoc/server/index/interfaces/TRPCProcedureBuilder.md)\<`TContext`, `TMeta`, `object`, `UnsetMarker`, `UnsetMarker`, `UnsetMarker`, `UnsetMarker`, `false`, `$Root`\[`"errorShape"`\]\>

Defined in: [packages/server/src/unstable-core-do-not-import/initTRPC.ts:88](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/initTRPC.ts#L88)

The base procedure builder. Add inputs, middlewares and a resolver to
make a query, mutation or subscription.

#### See

https://trpc.io/docs/server/procedures

***

### router

> **router**: [`TRPCRouterBuilder`](https://trpc.io/docs/typedoc/server/index/interfaces/TRPCRouterBuilder.md)\<`$Root`\>

Defined in: [packages/server/src/unstable-core-do-not-import/initTRPC.ts:112](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/unstable-core-do-not-import/initTRPC.ts#L112)

Creates a router from a record of procedures and sub-routers.

#### See

https://trpc.io/docs/server/routers
