(
fetchOptions?: ObserverFetchOptions
)
| 361 | } |
| 362 | |
| 363 | private executeFetch( |
| 364 | fetchOptions?: ObserverFetchOptions |
| 365 | ): Promise<TQueryData | undefined> { |
| 366 | // Make sure we reference the latest query as the current one might have been removed |
| 367 | this.updateQuery() |
| 368 | |
| 369 | // Fetch |
| 370 | let promise: Promise<TQueryData | undefined> = this.currentQuery.fetch( |
| 371 | this.options as unknown as QueryOptions<TQueryFnData, TError, TQueryData, TQueryKey>, |
| 372 | fetchOptions |
| 373 | ) |
| 374 | |
| 375 | if (!fetchOptions?.throwOnError) { |
| 376 | promise = promise.catch(noop) |
| 377 | } |
| 378 | |
| 379 | return promise |
| 380 | } |
| 381 | |
| 382 | private updateStaleTimeout(): void { |
| 383 | this.clearStaleTimeout() |
no test coverage detected