(
filters?: RefetchQueryFilters<TTaggedQueryKey>,
options: RefetchOptions = {},
)
| 318 | } |
| 319 | |
| 320 | refetchQueries<TTaggedQueryKey extends QueryKey = QueryKey>( |
| 321 | filters?: RefetchQueryFilters<TTaggedQueryKey>, |
| 322 | options: RefetchOptions = {}, |
| 323 | ): Promise<void> { |
| 324 | const fetchOptions = { |
| 325 | ...options, |
| 326 | cancelRefetch: options.cancelRefetch ?? true, |
| 327 | } |
| 328 | const promises = notifyManager.batch(() => |
| 329 | this.#queryCache |
| 330 | .findAll(filters) |
| 331 | .filter((query) => !query.isDisabled() && !query.isStatic()) |
| 332 | .map((query) => { |
| 333 | let promise = query.fetch(undefined, fetchOptions) |
| 334 | if (!fetchOptions.throwOnError) { |
| 335 | promise = promise.catch(noop) |
| 336 | } |
| 337 | return query.state.fetchStatus === 'paused' |
| 338 | ? Promise.resolve() |
| 339 | : promise |
| 340 | }), |
| 341 | ) |
| 342 | |
| 343 | return Promise.all(promises).then(noop) |
| 344 | } |
| 345 | |
| 346 | async query< |
| 347 | TQueryFnData, |
no test coverage detected