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

Method createFetchContext

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

addSignalPropertyFunction · 0.85

Tested by

no test coverage detected