MCPcopy Index your code
hub / github.com/TanStack/query / customFetchData

Function customFetchData

packages/query-core/src/__tests__/hydration.test.tsx:652–663  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

650 let resolvePromise: (value: unknown) => void = () => undefined
651
652 const customFetchData = () => {
653 const promise = new Promise((resolve) => {
654 resolvePromise = resolve
655 })
656 // Resolve the promise in initial fetch
657 // because we are awaiting the query first time
658 if (isInitialFetch) {
659 resolvePromise('string')
660 }
661 isInitialFetch = false
662 return promise
663 }
664
665 await queryClient.prefetchQuery({
666 queryKey: ['string'],

Callers 1

hydration.test.tsxFile · 0.85

Calls 1

resolvePromiseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…