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

Function customFetchData

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

Source from the content-addressed store, hash-verified

769 let resolvePromise: (value: unknown) => void = () => undefined
770
771 const customFetchData = () => {
772 const promise = new Promise((resolve) => {
773 resolvePromise = resolve
774 })
775 // Resolve the promise in initial fetch
776 // because we are awaiting the query first time
777 if (isInitialFetch) {
778 resolvePromise('string')
779 }
780 isInitialFetch = false
781 return promise
782 }
783
784 await queryClient
785 .query({

Callers 1

hydration.test.tsxFile · 0.85

Calls 1

resolvePromiseFunction · 0.85

Tested by

no test coverage detected