@apollo/client 3.13.4 → 3.13.5

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 3.13.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#12461](https://github.com/apollographql/apollo-client/pull/12461) [`12c8d06`](https://github.com/apollographql/apollo-client/commit/12c8d06f1ef7cfbece8e3a63b7ad09d91334f663) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where a `cache-first` query would return the result for previous variables when a cache update is issued after simultaneously changing variables and skipping the query.
8
+
3
9
  ## 3.13.4
4
10
 
5
11
  ### Patch Changes
package/apollo-client.cjs CHANGED
@@ -31,7 +31,7 @@ function _interopNamespace(e) {
31
31
  var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
32
32
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
33
33
 
34
- var version = "3.13.4";
34
+ var version = "3.13.5";
35
35
 
36
36
  function maybe(thunk) {
37
37
  try {
@@ -5809,6 +5809,7 @@ var QueryInfo = (function () {
5809
5809
  }
5810
5810
  if (!equal.equal(query.variables, this.variables)) {
5811
5811
  this.lastDiff = void 0;
5812
+ this.cancel();
5812
5813
  }
5813
5814
  Object.assign(this, {
5814
5815
  document: query.document,
@@ -5930,13 +5931,16 @@ var QueryInfo = (function () {
5930
5931
  this.stopped = true;
5931
5932
  this.reset();
5932
5933
  this.cancel();
5933
- this.cancel = QueryInfo.prototype.cancel;
5934
5934
  var oq = this.observableQuery;
5935
5935
  if (oq)
5936
5936
  oq.stopPolling();
5937
5937
  }
5938
5938
  };
5939
- QueryInfo.prototype.cancel = function () { };
5939
+ QueryInfo.prototype.cancel = function () {
5940
+ var _a;
5941
+ (_a = this.cancelWatch) === null || _a === void 0 ? void 0 : _a.call(this);
5942
+ this.cancelWatch = void 0;
5943
+ };
5940
5944
  QueryInfo.prototype.updateWatch = function (variables) {
5941
5945
  var _this = this;
5942
5946
  if (variables === void 0) { variables = this.variables; }
@@ -5947,7 +5951,7 @@ var QueryInfo = (function () {
5947
5951
  var watchOptions = tslib.__assign(tslib.__assign({}, this.getDiffOptions(variables)), { watcher: this, callback: function (diff) { return _this.setDiff(diff); } });
5948
5952
  if (!this.lastWatch || !equal.equal(watchOptions, this.lastWatch)) {
5949
5953
  this.cancel();
5950
- this.cancel = this.cache.watch((this.lastWatch = watchOptions));
5954
+ this.cancelWatch = this.cache.watch((this.lastWatch = watchOptions));
5951
5955
  }
5952
5956
  };
5953
5957
  QueryInfo.prototype.resetLastWrite = function () {