0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
query/docs/framework/angular/reference/functions/hashKey.md

575 B

id title
hashKey hashKey
function hashKey(queryKey: readonly unknown[]): string;

Defined in: packages/query-core/src/utils.ts:284

Default query & mutation keys hash function. Hashes the value into a stable hash.

Parameters

queryKey

readonly unknown[]

Returns

string

Example

// Object keys are sorted, so key order doesn't affect the hash:
hashKey(['todos', { page: 1, filter: 'done' }]) // === '["todos",{"filter":"done","page":1}]'