()
| 648 | |
| 649 | // Create fetch function |
| 650 | const fetchFn = () => { |
| 651 | const queryFn = ensureQueryFn(this.options, fetchOptions) |
| 652 | |
| 653 | // Create query function context |
| 654 | const createQueryFnContext = (): QueryFunctionContext<TQueryKey> => { |
| 655 | const queryFnContext: OmitKeyof< |
| 656 | QueryFunctionContext<TQueryKey>, |
| 657 | 'signal' |
| 658 | > = { |
| 659 | client: this.#client, |
| 660 | queryKey: this.queryKey, |
| 661 | meta: this.meta, |
| 662 | } |
| 663 | addSignalProperty(queryFnContext) |
| 664 | return queryFnContext as QueryFunctionContext<TQueryKey> |
| 665 | } |
| 666 | |
| 667 | const queryFnContext = createQueryFnContext() |
| 668 | |
| 669 | this.#abortSignalConsumed = false |
| 670 | if (this.options.persister) { |
| 671 | return this.options.persister( |
| 672 | queryFn, |
| 673 | queryFnContext, |
| 674 | this as unknown as Query, |
| 675 | ) |
| 676 | } |
| 677 | |
| 678 | return queryFn(queryFnContext) |
| 679 | } |
| 680 | |
| 681 | // Trigger behavior hook |
| 682 | const createFetchContext = (): FetchContext< |
no test coverage detected