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

Method createFetchContext

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

addSignalPropertyFunction · 0.85

Tested by

no test coverage detected