(
fetchOptions?: Omit<ObserverFetchOptions, 'initialPromise'>,
)
| 332 | } |
| 333 | |
| 334 | #executeFetch( |
| 335 | fetchOptions?: Omit<ObserverFetchOptions, 'initialPromise'>, |
| 336 | ): Promise<TQueryData | undefined> { |
| 337 | // Make sure we reference the latest query as the current one might have been removed |
| 338 | this.#updateQuery() |
| 339 | |
| 340 | // Fetch |
| 341 | let promise: Promise<TQueryData | undefined> = this.#currentQuery.fetch( |
| 342 | this.options as QueryOptions<TQueryFnData, TError, TQueryData, TQueryKey>, |
| 343 | fetchOptions, |
| 344 | ) |
| 345 | |
| 346 | if (!fetchOptions?.throwOnError) { |
| 347 | promise = promise.catch(noop) |
| 348 | } |
| 349 | |
| 350 | return promise |
| 351 | } |
| 352 | |
| 353 | #updateStaleTimeout(): void { |
| 354 | this.#clearStaleTimeout() |
no test coverage detected