Open History to see the last commit
1---
2id: hashKey
3title: hashKey
4---
5β
6```ts
7function hashKey(queryKey: readonly unknown[]): string;
8```
9β
10Defined in: packages/query-core/dist-ts/src/utils.d.ts:133
11β
12Default query & mutation keys hash function.
13Hashes the value into a stable hash.
14β
15## Parameters
16β
17### queryKey
18β
19readonly `unknown`[]
20β
21## Returns
22β
23`string`
24β
25## Example
26β
27```ts
28// Object keys are sorted, so key order doesn't affect the hash:
29hashKey(['todos', { page: 1, filter: 'done' }]) // === '["todos",{"filter":"done","page":1}]'
30```