(opts)
| 1749 | * @returns Promise that resolves when the refetch is complete, with QueryObserverResult |
| 1750 | */ |
| 1751 | const refetch: RefetchFn = async (opts) => { |
| 1752 | const allQueryKeys = [...hashToQueryKey.values()] |
| 1753 | const refetchPromises = allQueryKeys.map((qKey) => { |
| 1754 | const queryObserver = state.observers.get(hashKey(qKey))! |
| 1755 | return queryObserver.refetch({ |
| 1756 | throwOnError: opts?.throwOnError, |
| 1757 | }) |
| 1758 | }) |
| 1759 | |
| 1760 | return Promise.all(refetchPromises) |
| 1761 | } |
| 1762 | |
| 1763 | /** |
| 1764 | * Updates a single query key in the cache with new items, handling both direct arrays |
no test coverage detected