()
| 770 | |
| 771 | // Create fetch function |
| 772 | const fetchFn = () => { |
| 773 | const queryFn = ensureQueryFn(this.options, fetchOptions) |
| 774 | |
| 775 | // Create query function context |
| 776 | const createQueryFnContext = (): QueryFunctionContext<TQueryKey> => { |
| 777 | const queryFnContext: OmitKeyof< |
| 778 | QueryFunctionContext<TQueryKey>, |
| 779 | 'signal' |
| 780 | > = { |
| 781 | client: this.#client, |
| 782 | queryKey: this.queryKey, |
| 783 | meta: this.meta, |
| 784 | } |
| 785 | addSignalProperty(queryFnContext) |
| 786 | return queryFnContext as QueryFunctionContext<TQueryKey> |
| 787 | } |
| 788 | |
| 789 | const queryFnContext = createQueryFnContext() |
| 790 | |
| 791 | this.#abortSignalConsumed = false |
| 792 | if (this.options.persister) { |
| 793 | return this.options.persister( |
| 794 | queryFn, |
| 795 | queryFnContext, |
| 796 | this as unknown as Query, |
| 797 | ) |
| 798 | } |
| 799 | |
| 800 | return queryFn(queryFnContext) |
| 801 | } |
| 802 | |
| 803 | // Trigger behavior hook |
| 804 | const createFetchContext = (): FetchContext< |
no test coverage detected