* Merges the given partial state directly into this query's state, notifying observers. Used * by persistence and broadcast plugins to restore a state snapshot, and by devtools to let a * user manually trigger a loading/error state or edit the cached data. * @param state - The partial state
(state: Partial<QueryState<TData, TError>>)
| 411 | * @param state - The partial state to merge into the query's state. |
| 412 | */ |
| 413 | setState(state: Partial<QueryState<TData, TError>>): void { |
| 414 | this.#dispatch({ type: 'setState', state }) |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * Cancels the query's currently in-flight fetch, if any. |