Open History to see the last commit
function matchQuery(filters: QueryFilters, query: Query<any, any, any, any>): boolean;
Defined in: packages/query-core/src/utils.ts:175
Checks whether a query matches the given QueryFilters. Every filter that is specified must match; filters that are left unspecified are ignored.
Parameters#
filters#
query#
Query<any, any, any, any>
Returns#
boolean
Example#
const queryCache = queryClient.getQueryCache()
const matchingQueries = queryCache
.getAll()
.filter((query) => matchQuery({ queryKey: ['posts'] }, query))