# Interface: FastifyTRPCPluginOptions<TRouter>

> 

Defined in: [packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts:25](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts#L25)

The options of `fastifyTRPCPlugin`.

## See

https://trpc.io/docs/server/adapters/fastify#fastify-plugin-options

## Type Parameters

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

## Properties

### prefix?

> `optional` **prefix**: `string`

Defined in: [packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts:27](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts#L27)

The path the router is served at, such as `/trpc`.

***

### trpcOptions

> **trpcOptions**: [`HTTPBaseHandlerOptions`](https://trpc.io/docs/typedoc/server/http/interfaces/HTTPBaseHandlerOptions.md)\<`TRouter`, `FastifyRequest`\<`RouteGenericInterface`, `RawServerDefault`, `IncomingMessage`, `FastifySchema`, `FastifyTypeProviderDefault`, `unknown`, `FastifyBaseLogger`, `ResolveFastifyRequestType`\<`FastifyTypeProviderDefault`, `FastifySchema`, `RouteGenericInterface`\>\>\> & `object` & `PartialIf`\<`object` *extends* [`inferRouterContext`](https://trpc.io/docs/typedoc/server/index/type-aliases/inferRouterContext.md)\<`TRouter`\> ? `true` : `false`, \{ `createContext`: [`NodeHTTPCreateContextFn`](https://trpc.io/docs/typedoc/server/adapters/node-http/type-aliases/NodeHTTPCreateContextFn.md); \}\> & `Pick`\<[`WSSHandlerOptions`](https://trpc.io/docs/typedoc/server/adapters/ws/type-aliases/WSSHandlerOptions.md)\<`TRouter`\>, `"keepAlive"` \| `"dangerouslyDisablePong"` \| `"experimental_encoder"`\>

Defined in: [packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts:38](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts#L38)

The router and handler options. `keepAlive`, `dangerouslyDisablePong`
and `experimental_encoder` only apply with `useWSS`.

#### Type declaration

##### maxBodySize?

> `optional` **maxBodySize**: `number`

The largest request body, in bytes. A larger one gets a
`PAYLOAD_TOO_LARGE` error. It applies to bodies tRPC streams, such as
`multipart/form-data`; JSON bodies are read by Fastify, so limit them
with Fastify's `bodyLimit`.

***

### useWSS?

> `optional` **useWSS**: `boolean`

Defined in: [packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts:33](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts#L33)

Whether to serve WebSockets too. Needs `@fastify/websocket` to be
registered first.

#### See

https://trpc.io/docs/server/adapters/fastify#enable-websockets
