@tanstack/vue-query 5.0.0-alpha.24 → 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.
@@ -1061,7 +1061,7 @@
1061
1061
  constructor(config = {}) {
1062
1062
  super();
1063
1063
  this.config = config;
1064
- this.#queries = config.createStore?.() ?? new Map();
1064
+ this.#queries = new Map();
1065
1065
  }
1066
1066
  build(client, options, state) {
1067
1067
  const queryKey = options.queryKey;
@@ -1720,15 +1720,18 @@
1720
1720
  });
1721
1721
  }
1722
1722
  refetchQueries(filters = {}, options) {
1723
- const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter(query => !query.isDisabled()).map(query => query.fetch(undefined, {
1723
+ const fetchOptions = {
1724
1724
  ...options,
1725
1725
  cancelRefetch: options?.cancelRefetch ?? true
1726
- })));
1727
- let promise = Promise.all(promises).then(noop);
1728
- if (!options?.throwOnError) {
1729
- promise = promise.catch(noop);
1730
- }
1731
- return promise;
1726
+ };
1727
+ const promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter(query => !query.isDisabled()).map(query => {
1728
+ let promise = query.fetch(undefined, fetchOptions);
1729
+ if (!fetchOptions.throwOnError) {
1730
+ promise = promise.catch(noop);
1731
+ }
1732
+ return query.state.fetchStatus === 'paused' ? Promise.resolve() : promise;
1733
+ }));
1734
+ return Promise.all(promises).then(noop);
1732
1735
  }
1733
1736
  fetchQuery(options) {
1734
1737
  const defaultedOptions = this.defaultQueryOptions(options);