* Synchronous way to immediately update the cached data of multiple queries at once, using * filters or partial query key matching. Only queries that already exist and match the given * filters are updated; no new cache entries are created. Internally this calls * {@link QueryClient#setQuer
(
filters: TQueryFilters,
updater: Updater<
NoInfer<TQueryFnData> | undefined,
NoInfer<TQueryFnData> | undefined
>,
options?: SetDataOptions,
)
| 319 | * ``` |
| 320 | */ |
| 321 | setQueriesData< |
| 322 | TQueryFnData, |
| 323 | TQueryFilters extends QueryFilters<any> = QueryFilters, |
| 324 | >( |
| 325 | filters: TQueryFilters, |
| 326 | updater: Updater< |
| 327 | NoInfer<TQueryFnData> | undefined, |
| 328 | NoInfer<TQueryFnData> | undefined |
| 329 | >, |
| 330 | options?: SetDataOptions, |
| 331 | ): Array<[QueryKey, TQueryFnData | undefined]> { |
| 332 | return notifyManager.batch(() => |
| 333 | this.#queryCache |
| 334 | .findAll(filters) |
| 335 | .map(({ queryKey }) => [ |
| 336 | queryKey, |
| 337 | this.setQueryData<TQueryFnData>(queryKey, updater, options), |
| 338 | ]), |
| 339 | ) |
| 340 | } |
| 341 | |
| 342 | /** |
| 343 | * Imperative (non-reactive) way to retrieve an existing query's state. If the query does not |
no test coverage detected