@apollo/client 3.3.13 → 3.3.14

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.
Files changed (36) hide show
  1. package/apollo-client.cjs.js +13 -6
  2. package/apollo-client.cjs.js.map +1 -1
  3. package/apollo-client.cjs.min.js +1 -1
  4. package/cache/cache.cjs.js +4 -1
  5. package/cache/cache.cjs.js.map +1 -1
  6. package/cache/inmemory/policies.d.ts +2 -2
  7. package/cache/inmemory/policies.d.ts.map +1 -1
  8. package/cache/inmemory/policies.js +4 -1
  9. package/cache/inmemory/policies.js.map +1 -1
  10. package/cache/inmemory/writeToStore.js.map +1 -1
  11. package/core/QueryInfo.d.ts.map +1 -1
  12. package/core/QueryInfo.js +1 -0
  13. package/core/QueryInfo.js.map +1 -1
  14. package/core/core.cjs.js +2 -1
  15. package/core/core.cjs.js.map +1 -1
  16. package/invariantErrorCodes.js +1 -1
  17. package/package.json +8 -8
  18. package/react/data/SubscriptionData.d.ts.map +1 -1
  19. package/react/data/SubscriptionData.js +7 -4
  20. package/react/data/SubscriptionData.js.map +1 -1
  21. package/react/data/data.cjs.js +7 -4
  22. package/react/data/data.cjs.js.map +1 -1
  23. package/react/ssr/RenderPromises.d.ts +1 -0
  24. package/react/ssr/RenderPromises.d.ts.map +1 -1
  25. package/react/ssr/RenderPromises.js +4 -0
  26. package/react/ssr/RenderPromises.js.map +1 -1
  27. package/react/ssr/getDataFromTree.d.ts.map +1 -1
  28. package/react/ssr/getDataFromTree.js +2 -0
  29. package/react/ssr/getDataFromTree.js.map +1 -1
  30. package/react/ssr/ssr.cjs.js +6 -0
  31. package/react/ssr/ssr.cjs.js.map +1 -1
  32. package/testing/testing.cjs.js +2 -2
  33. package/testing/testing.cjs.js.map +1 -1
  34. package/utilities/testing/mocking/mockSubscriptionLink.js +2 -2
  35. package/utilities/testing/mocking/mockSubscriptionLink.js.map +1 -1
  36. package/version.js +1 -1
@@ -1234,7 +1234,7 @@ var concat = ApolloLink.concat;
1234
1234
 
1235
1235
  var execute = ApolloLink.execute;
1236
1236
 
1237
- var version = '3.3.13';
1237
+ var version = '3.3.14';
1238
1238
 
1239
1239
  var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
1240
1240
  function parseAndCheckHttpResponse(operations) {
@@ -3121,7 +3121,7 @@ var Policies = (function () {
3121
3121
  break;
3122
3122
  }
3123
3123
  }
3124
- id = id && String(id);
3124
+ id = id ? String(id) : void 0;
3125
3125
  return context.keyObject ? [id, context.keyObject] : [id];
3126
3126
  };
3127
3127
  Policies.prototype.addTypePolicies = function (typePolicies) {
@@ -3327,6 +3327,9 @@ var Policies = (function () {
3327
3327
  ? storeKeyNameFromField(fieldSpec.field, fieldSpec.variables)
3328
3328
  : getStoreKeyName(fieldName, argsFromFieldSpecifier(fieldSpec));
3329
3329
  }
3330
+ if (storeFieldName === false) {
3331
+ return fieldName;
3332
+ }
3330
3333
  return fieldName === fieldNameFromStoreName(storeFieldName)
3331
3334
  ? storeFieldName
3332
3335
  : fieldName + ":" + storeFieldName;
@@ -4148,6 +4151,7 @@ var QueryInfo = (function () {
4148
4151
  QueryInfo.prototype.stop = function () {
4149
4152
  if (!this.stopped) {
4150
4153
  this.stopped = true;
4154
+ this.reset();
4151
4155
  this.cancel();
4152
4156
  delete this.cancel;
4153
4157
  this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
@@ -5417,10 +5421,13 @@ var SubscriptionData = (function (_super) {
5417
5421
  });
5418
5422
  };
5419
5423
  SubscriptionData.prototype.completeSubscription = function () {
5420
- var onSubscriptionComplete = this.getOptions().onSubscriptionComplete;
5421
- if (onSubscriptionComplete)
5422
- onSubscriptionComplete();
5423
- this.endSubscription();
5424
+ var _this = this;
5425
+ Promise.resolve().then(function () {
5426
+ var onSubscriptionComplete = _this.getOptions().onSubscriptionComplete;
5427
+ if (onSubscriptionComplete)
5428
+ onSubscriptionComplete();
5429
+ _this.endSubscription();
5430
+ });
5424
5431
  };
5425
5432
  SubscriptionData.prototype.endSubscription = function () {
5426
5433
  if (this.currentObservable.subscription) {