MCPcopy Create free account
hub / github.com/TanStack/query / refetch

Method refetch

packages/query-core/src/queryObserver.ts:387–393  ·  view source on GitHub ↗

* Refetches the observed query and returns a promise that resolves with * the resulting `QueryObserverResult`. * @param options - Set `cancelRefetch` to `false` to keep a running fetch instead of cancelling * it, and `throwOnError` to `true` to reject when the refetch fails. * @returns A

({ ...options }: RefetchOptions = {})

Source from the content-addressed store, hash-verified

385 * ```
386 */
387 refetch({ ...options }: RefetchOptions = {}): Promise<
388 QueryObserverResult<TData, TError>
389 > {
390 return this.fetch({
391 ...options,
392 })
393 }
394
395 /**
396 * Fetches a query defined by the given options without affecting this

Calls 1

fetchMethod · 0.95

Tested by 11

PageFunction · 0.64
PageFunction · 0.64
PageFunction · 0.64
PageFunction · 0.64
PageFunction · 0.64
PageFunction · 0.64
PageFunction · 0.64
PageFunction · 0.64
PageFunction · 0.64
PageFunction · 0.64
FirstComponentFunction · 0.64