()
| 685 | } |
| 686 | |
| 687 | private updateQuery(): void { |
| 688 | const query = this.client |
| 689 | .getQueryCache() |
| 690 | .build( |
| 691 | this.client, |
| 692 | this.options as unknown as QueryOptions< |
| 693 | TQueryFnData, |
| 694 | TError, |
| 695 | TQueryData, |
| 696 | TQueryKey |
| 697 | > |
| 698 | ) |
| 699 | |
| 700 | if (query === this.currentQuery) { |
| 701 | return |
| 702 | } |
| 703 | |
| 704 | const prevQuery = this.currentQuery |
| 705 | this.currentQuery = query |
| 706 | this.currentQueryInitialState = query.state |
| 707 | this.previousQueryResult = this.currentResult |
| 708 | |
| 709 | if (this.hasListeners()) { |
| 710 | prevQuery?.removeObserver(this) |
| 711 | query.addObserver(this) |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | onQueryUpdate(action: Action<TData, TError>): void { |
| 716 | const notifyOptions: NotifyOptions = {} |
no test coverage detected