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

Method createFetchContext

packages/query-core/src/query.ts:804–824  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

802
803 // Trigger behavior hook
804 const createFetchContext = (): FetchContext<
805 TQueryFnData,
806 TError,
807 TData,
808 TQueryKey
809 > => {
810 const context: OmitKeyof<
811 FetchContext<TQueryFnData, TError, TData, TQueryKey>,
812 'signal'
813 > = {
814 fetchOptions,
815 options: this.options,
816 queryKey: this.queryKey,
817 client: this.#client,
818 state: this.state,
819 fetchFn,
820 }
821
822 addSignalProperty(context)
823 return context as FetchContext<TQueryFnData, TError, TData, TQueryKey>
824 }
825
826 const context = createFetchContext()
827

Callers

nothing calls this directly

Calls 1

addSignalPropertyFunction · 0.85

Tested by

no test coverage detected