* Imperative (non-reactive) way to retrieve the cached data of multiple queries at once. * Only queries matching the given filters are returned; if none match, an empty array is * returned. * * Because the matched queries can hold data of different shapes (e.g. a broad filter can match
(filters: TQueryFilters)
| 240 | * ``` |
| 241 | */ |
| 242 | getQueriesData< |
| 243 | TQueryFnData = unknown, |
| 244 | TQueryFilters extends QueryFilters<any> = QueryFilters, |
| 245 | >(filters: TQueryFilters): Array<[QueryKey, TQueryFnData | undefined]> { |
| 246 | return this.#queryCache.findAll(filters).map(({ queryKey, state }) => { |
| 247 | const data = state.data as TQueryFnData | undefined |
| 248 | return [queryKey, data] |
| 249 | }) |
| 250 | } |
| 251 | |
| 252 | /** |
| 253 | * Synchronous way to immediately update a query's cached data. If the updater (or the value |
no test coverage detected