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