Open History to see the last commit
1---
2id: getLiveQueryKey
3title: getLiveQueryKey
4---
5
6```ts
7function getLiveQueryKey(input): LiveQueryKey | undefined;
8```
9
10Defined in: [packages/db/src/live-query-adapter.ts:51](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-adapter.ts#L51)
11
12The `queryKey` of a config-object query input, if it supplies one. An empty
13key is absent, as it is for `getLiveQueryHash`, so a hook and a `DbClient`
14preload agree on the query's identity.
15
16## Parameters
17
18### input
19
20`unknown`
21
22## Returns
23
24[`LiveQueryKey`](../type-aliases/LiveQueryKey.md) \| `undefined`