Interface: FastifyTRPCPluginOptions<TRouter>
On this page
Defined in: packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts:25
The options of fastifyTRPCPlugin.
See
https://trpc.io/docs/server/adapters/fastify#fastify-plugin-options
Type Parameters
| Type Parameter |
|---|
TRouter extends AnyTRPCRouter |
Properties
prefix?
optionalprefix:string
Defined in: packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts:27
The path the router is served at, such as /trpc.
trpcOptions
trpcOptions:
HTTPBaseHandlerOptions<TRouter,FastifyRequest<RouteGenericInterface,RawServerDefault,IncomingMessage,FastifySchema,FastifyTypeProviderDefault,unknown,FastifyBaseLogger,ResolveFastifyRequestType<FastifyTypeProviderDefault,FastifySchema,RouteGenericInterface>>> &PartialIf<objectextendsinferRouterContext<TRouter> ?true:false, {createContext:NodeHTTPCreateContextFn; }> &Pick<WSSHandlerOptions<TRouter>,"keepAlive"|"dangerouslyDisablePong"|"experimental_encoder">
Defined in: packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts:38
The router and handler options. keepAlive, dangerouslyDisablePong
and experimental_encoder only apply with useWSS.
useWSS?
optionaluseWSS:boolean
Defined in: packages/server/src/adapters/fastify/fastifyTRPCPlugin.ts:33
Whether to serve WebSockets too. Needs @fastify/websocket to be
registered first.
See
https://trpc.io/docs/server/adapters/fastify#enable-websockets