# Type Alias: TRPCQueryKey<TPrefixEnabled>

> 

> **TRPCQueryKey**\<`TPrefixEnabled`\>: `TPrefixEnabled` *extends* `true` ? [`TRPCQueryKeyWithPrefix`](https://trpc.io/docs/typedoc/tanstack-react-query/type-aliases/TRPCQueryKeyWithPrefix.md) : [`TRPCQueryKeyWithoutPrefix`](https://trpc.io/docs/typedoc/tanstack-react-query/type-aliases/TRPCQueryKeyWithoutPrefix.md)

Defined in: [tanstack-react-query/src/internals/types.ts:121](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/tanstack-react-query/src/internals/types.ts#L121)

A tRPC query key, with a prefix if `TPrefixEnabled` is `true`.

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TPrefixEnabled` *extends* `boolean` | `false` |

## See

https://trpc.io/docs/client/tanstack-react-query/usage#queryKey
