@apollo/client 3.3.14 → 3.3.15

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.
@@ -1234,7 +1234,7 @@ var concat = ApolloLink.concat;
1234
1234
 
1235
1235
  var execute = ApolloLink.execute;
1236
1236
 
1237
- var version = '3.3.14';
1237
+ var version = '3.3.15';
1238
1238
 
1239
1239
  var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
1240
1240
  function parseAndCheckHttpResponse(operations) {
@@ -4765,10 +4765,10 @@ var QueryManager = (function () {
4765
4765
  return observable;
4766
4766
  };
4767
4767
  QueryManager.prototype.getResultsFromLink = function (queryInfo, allowCacheWrite, options) {
4768
- var lastRequestId = queryInfo.lastRequestId;
4768
+ var requestId = queryInfo.lastRequestId = this.generateRequestId();
4769
4769
  return asyncMap(this.getObservableFromLink(queryInfo.document, options.context, options.variables), function (result) {
4770
4770
  var hasErrors = isNonEmptyArray(result.errors);
4771
- if (lastRequestId >= queryInfo.lastRequestId) {
4771
+ if (requestId >= queryInfo.lastRequestId) {
4772
4772
  if (hasErrors && options.errorPolicy === "none") {
4773
4773
  throw queryInfo.markError(new ApolloError({
4774
4774
  graphQLErrors: result.errors,
@@ -4790,7 +4790,7 @@ var QueryManager = (function () {
4790
4790
  var error = isApolloError(networkError)
4791
4791
  ? networkError
4792
4792
  : new ApolloError({ networkError: networkError });
4793
- if (lastRequestId >= queryInfo.lastRequestId) {
4793
+ if (requestId >= queryInfo.lastRequestId) {
4794
4794
  queryInfo.markError(error);
4795
4795
  }
4796
4796
  throw error;
@@ -4855,7 +4855,6 @@ var QueryManager = (function () {
4855
4855
  queryInfo.init({
4856
4856
  document: query,
4857
4857
  variables: variables,
4858
- lastRequestId: this.generateRequestId(),
4859
4858
  networkStatus: networkStatus,
4860
4859
  });
4861
4860
  var readCache = function () { return queryInfo.getDiff(variables); };
@@ -5694,17 +5693,13 @@ var QueryData = (function (_super) {
5694
5693
  this.previous.result = ssrLoading;
5695
5694
  return ssrLoading;
5696
5695
  }
5697
- var result;
5698
5696
  if (this.ssrInitiated()) {
5699
- if (skip) {
5700
- result = this.getQueryResult();
5701
- }
5702
- else {
5703
- result =
5704
- this.context.renderPromises.addQueryPromise(this, this.getQueryResult) || ssrLoading;
5697
+ var result = this.getQueryResult() || ssrLoading;
5698
+ if (result.loading && !skip) {
5699
+ this.context.renderPromises.addQueryPromise(this, function () { return null; });
5705
5700
  }
5701
+ return result;
5706
5702
  }
5707
- return result;
5708
5703
  };
5709
5704
  QueryData.prototype.prepareObservableQueryOptions = function () {
5710
5705
  var options = this.getOptions();