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

Method refetch

packages/query-core/src/queryObserver.ts:386–392  ·  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

384 * ```
385 */
386 refetch({ ...options }: RefetchOptions = {}): Promise<
387 QueryObserverResult<TData, TError>
388 > {
389 return this.fetch({
390 ...options,
391 })
392 }
393
394 /**
395 * 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