# Function: ~~createServerSideHelpers()~~

> 

> **createServerSideHelpers**\<`TRouter`\>(`opts`): `ProtectedIntersection`\<\{ `dehydrate`: (`opts`?) => `DehydratedState`; `queryClient`: `QueryClient`; \}, `DecoratedProcedureSSGRecord`\<`TRouter`\[`"_def"`\]\[`"_config"`\]\[`"$types"`\], `TRouter`\[`"_def"`\]\[`"record"`\]\>\>

Defined in: [packages/react-query/src/server/ssgProxy.ts:99](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/react-query/src/server/ssgProxy.ts#L99)

Creates helpers that fetch or prefetch queries on the server, for
server-side rendering and static generation.

## Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* `AnyRouter` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `opts` | `CreateServerSideHelpersOptions`\<`TRouter`\> |

## Returns

`ProtectedIntersection`\<\{ `dehydrate`: (`opts`?) => `DehydratedState`; `queryClient`: `QueryClient`; \}, `DecoratedProcedureSSGRecord`\<`TRouter`\[`"_def"`\]\[`"_config"`\]\[`"$types"`\], `TRouter`\[`"_def"`\]\[`"record"`\]\>\>

## Deprecated

`@trpc/react-query` only gets bug fixes and will be removed in
the next major version. Use `@trpc/tanstack-react-query` instead.

## See

 - https://trpc.io/docs/client/tanstack-react-query/migrating
 - https://trpc.io/docs/client/nextjs/pages-router/server-side-helpers
