()
| 455 | |
| 456 | // Create fetch function |
| 457 | const fetchFn = () => { |
| 458 | const queryFn = ensureQueryFn(this.options, fetchOptions) |
| 459 | |
| 460 | // Create query function context |
| 461 | const createQueryFnContext = (): QueryFunctionContext<TQueryKey> => { |
| 462 | const queryFnContext: OmitKeyof< |
| 463 | QueryFunctionContext<TQueryKey>, |
| 464 | 'signal' |
| 465 | > = { |
| 466 | client: this.#client, |
| 467 | queryKey: this.queryKey, |
| 468 | meta: this.meta, |
| 469 | } |
| 470 | addSignalProperty(queryFnContext) |
| 471 | return queryFnContext as QueryFunctionContext<TQueryKey> |
| 472 | } |
| 473 | |
| 474 | const queryFnContext = createQueryFnContext() |
| 475 | |
| 476 | this.#abortSignalConsumed = false |
| 477 | if (this.options.persister) { |
| 478 | return this.options.persister( |
| 479 | queryFn, |
| 480 | queryFnContext, |
| 481 | this as unknown as Query, |
| 482 | ) |
| 483 | } |
| 484 | |
| 485 | return queryFn(queryFnContext) |
| 486 | } |
| 487 | |
| 488 | // Trigger behavior hook |
| 489 | const createFetchContext = (): FetchContext< |
no test coverage detected