Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
API Reference
API Reference

partialMatchKey

ts
function partialMatchKey(a: readonly unknown[], b: readonly unknown[]): boolean;
function partialMatchKey(a: readonly unknown[], b: readonly unknown[]): boolean;

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

Checks if key b partially matches with key a.

Parameters

a

readonly unknown[]

The key to check, e.g. a query's own key.

b

readonly unknown[]

The (partial) key to match against a.

Returns

boolean

true if every array element or object property in b matches the one at the same position in a.