@tanstack/react-query 5.0.0-alpha.25 → 5.0.0-alpha.26

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.
@@ -1080,7 +1080,7 @@
1080
1080
  constructor(config = {}) {
1081
1081
  super();
1082
1082
  this.config = config;
1083
- this.#queries = config.createStore?.() ?? new Map();
1083
+ this.#queries = new Map();
1084
1084
  }
1085
1085
  build(client, options, state) {
1086
1086
  const queryKey = options.queryKey;
@@ -1739,15 +1739,18 @@
1739
1739
  });
1740
1740
  }
1741
1741
  refetchQueries(filters = {}, options) {
1742
- const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter(query => !query.isDisabled()).map(query => query.fetch(undefined, {
1742
+ const fetchOptions = {
1743
1743
  ...options,
1744
1744
  cancelRefetch: options?.cancelRefetch ?? true
1745
- })));
1746
- let promise = Promise.all(promises).then(noop$1);
1747
- if (!options?.throwOnError) {
1748
- promise = promise.catch(noop$1);
1749
- }
1750
- return promise;
1745
+ };
1746
+ const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter(query => !query.isDisabled()).map(query => {
1747
+ let promise = query.fetch(undefined, fetchOptions);
1748
+ if (!fetchOptions.throwOnError) {
1749
+ promise = promise.catch(noop$1);
1750
+ }
1751
+ return query.state.fetchStatus === 'paused' ? Promise.resolve() : promise;
1752
+ }));
1753
+ return Promise.all(promises).then(noop$1);
1751
1754
  }
1752
1755
  fetchQuery(options) {
1753
1756
  const defaultedOptions = this.defaultQueryOptions(options);