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

Method createFetchContext

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

Source from the content-addressed store, hash-verified

487
488 // Trigger behavior hook
489 const createFetchContext = (): FetchContext<
490 TQueryFnData,
491 TError,
492 TData,
493 TQueryKey
494 > => {
495 const context: OmitKeyof<
496 FetchContext<TQueryFnData, TError, TData, TQueryKey>,
497 'signal'
498 > = {
499 fetchOptions,
500 options: this.options,
501 queryKey: this.queryKey,
502 client: this.#client,
503 state: this.state,
504 fetchFn,
505 }
506
507 addSignalProperty(context)
508 return context as FetchContext<TQueryFnData, TError, TData, TQueryKey>
509 }
510
511 const context = createFetchContext()
512

Callers

nothing calls this directly

Calls 1

addSignalPropertyFunction · 0.85

Tested by

no test coverage detected