@tanstack/react-query 4.23.0 → 4.24.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -834,6 +834,7 @@
834
834
  this.queryHash = config.queryHash;
835
835
  this.initialState = config.state || getDefaultState$1(this.options);
836
836
  this.state = this.initialState;
837
+ this.scheduleGc();
837
838
  }
838
839
 
839
840
  get meta() {
@@ -1720,8 +1721,14 @@
1720
1721
  }
1721
1722
 
1722
1723
  resumePausedMutations() {
1723
- const pausedMutations = this.mutations.filter(x => x.state.isPaused);
1724
- return notifyManager.batch(() => pausedMutations.reduce((promise, mutation) => promise.then(() => mutation.continue().catch(noop$1)), Promise.resolve()));
1724
+ if (!this.resuming) {
1725
+ const pausedMutations = this.mutations.filter(x => x.state.isPaused);
1726
+ this.resuming = notifyManager.batch(() => pausedMutations.reduce((promise, mutation) => promise.then(() => mutation.continue().catch(noop$1)), Promise.resolve())).then(() => {
1727
+ this.resuming = undefined;
1728
+ });
1729
+ }
1730
+
1731
+ return this.resuming;
1725
1732
  }
1726
1733
 
1727
1734
  }