@apollo/client 3.14.0-rc.0 → 3.14.1

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 (134) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/apollo-client.cjs +85 -77
  3. package/apollo-client.cjs.map +1 -1
  4. package/apollo-client.min.cjs +1 -1
  5. package/cache/cache.cjs +14 -41
  6. package/cache/cache.cjs.map +1 -1
  7. package/cache/cache.cjs.native.js +14 -41
  8. package/cache/core/cache.js +1 -1
  9. package/cache/core/cache.js.map +1 -1
  10. package/cache/inmemory/inMemoryCache.js +1 -1
  11. package/cache/inmemory/inMemoryCache.js.map +1 -1
  12. package/core/ApolloClient.js +1 -1
  13. package/core/ApolloClient.js.map +1 -1
  14. package/core/ObservableQuery.d.ts +1 -0
  15. package/core/ObservableQuery.js +10 -6
  16. package/core/ObservableQuery.js.map +1 -1
  17. package/core/QueryInfo.js +1 -1
  18. package/core/QueryInfo.js.map +1 -1
  19. package/core/QueryManager.js +1 -1
  20. package/core/QueryManager.js.map +1 -1
  21. package/core/core.cjs +38 -61
  22. package/core/core.cjs.map +1 -1
  23. package/core/core.cjs.native.js +38 -61
  24. package/dev/dev.cjs +49 -53
  25. package/dev/dev.cjs.map +1 -1
  26. package/dev/dev.cjs.native.js +49 -53
  27. package/invariantErrorCodes.js +48 -53
  28. package/link/core/ApolloLink.js +1 -1
  29. package/link/core/ApolloLink.js.map +1 -1
  30. package/link/core/core.cjs +1 -15
  31. package/link/core/core.cjs.map +1 -1
  32. package/link/core/core.cjs.native.js +1 -15
  33. package/package.json +1 -1
  34. package/react/components/components.cjs +2 -14
  35. package/react/components/components.cjs.map +1 -1
  36. package/react/components/components.cjs.native.js +2 -14
  37. package/react/hoc/graphql.js +1 -1
  38. package/react/hoc/graphql.js.map +1 -1
  39. package/react/hoc/hoc.cjs +12 -31
  40. package/react/hoc/hoc.cjs.map +1 -1
  41. package/react/hoc/hoc.cjs.native.js +12 -31
  42. package/react/hoc/mutation-hoc.js +1 -1
  43. package/react/hoc/mutation-hoc.js.map +1 -1
  44. package/react/hoc/query-hoc.js +1 -1
  45. package/react/hoc/query-hoc.js.map +1 -1
  46. package/react/hoc/subscription-hoc.js +1 -1
  47. package/react/hoc/subscription-hoc.js.map +1 -1
  48. package/react/hooks/hooks.cjs +26 -52
  49. package/react/hooks/hooks.cjs.map +1 -1
  50. package/react/hooks/hooks.cjs.native.js +26 -52
  51. package/react/hooks/internal/useWarnRemoved.d.ts +1 -1
  52. package/react/hooks/internal/useWarnRemoved.js +1 -1
  53. package/react/hooks/internal/useWarnRemoved.js.map +1 -1
  54. package/react/hooks/internal/useWarnRemovedOption.d.ts +2 -1
  55. package/react/hooks/internal/useWarnRemovedOption.js +7 -5
  56. package/react/hooks/internal/useWarnRemovedOption.js.map +1 -1
  57. package/react/hooks/useApolloClient.js +1 -1
  58. package/react/hooks/useBackgroundQuery.js +1 -1
  59. package/react/hooks/useBackgroundQuery.js.map +1 -1
  60. package/react/hooks/useFragment.js +1 -1
  61. package/react/hooks/useFragment.js.map +1 -1
  62. package/react/hooks/useLazyQuery.js +3 -3
  63. package/react/hooks/useLazyQuery.js.map +1 -1
  64. package/react/hooks/useLoadableQuery.js +3 -3
  65. package/react/hooks/useLoadableQuery.js.map +1 -1
  66. package/react/hooks/useQuery.js +3 -3
  67. package/react/hooks/useQuery.js.map +1 -1
  68. package/react/hooks/useSubscription.js +3 -3
  69. package/react/hooks/useSuspenseQuery.js +3 -3
  70. package/react/hooks/useSuspenseQuery.js.map +1 -1
  71. package/react/hooks/useSyncExternalStore.js +1 -1
  72. package/react/internal/cache/QueryReference.js +2 -2
  73. package/react/internal/cache/QueryReference.js.map +1 -1
  74. package/react/internal/internal.cjs +3 -14
  75. package/react/internal/internal.cjs.map +1 -1
  76. package/react/internal/internal.cjs.native.js +3 -14
  77. package/react/parser/index.js +7 -7
  78. package/react/parser/index.js.map +1 -1
  79. package/react/parser/parser.cjs +9 -29
  80. package/react/parser/parser.cjs.map +1 -1
  81. package/react/parser/parser.cjs.native.js +9 -29
  82. package/react/query-preloader/createQueryPreloader.js +1 -1
  83. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  84. package/react/react.cjs +4 -31
  85. package/react/react.cjs.map +1 -1
  86. package/react/react.cjs.native.js +4 -31
  87. package/testing/core/core.cjs +4 -4
  88. package/testing/core/core.cjs.map +1 -1
  89. package/testing/core/core.cjs.native.js +4 -4
  90. package/testing/core/mocking/mockLink.d.ts +13 -0
  91. package/testing/core/mocking/mockLink.js +4 -4
  92. package/testing/core/mocking/mockLink.js.map +1 -1
  93. package/testing/internal/disposables/index.d.ts +1 -0
  94. package/testing/internal/disposables/index.js +1 -0
  95. package/testing/internal/disposables/index.js.map +1 -1
  96. package/testing/internal/disposables/withMutedDeprecations.d.ts +4 -0
  97. package/testing/internal/disposables/withMutedDeprecations.js +13 -0
  98. package/testing/internal/disposables/withMutedDeprecations.js.map +1 -0
  99. package/testing/react/MockedProvider.js +1 -1
  100. package/testing/react/MockedProvider.js.map +1 -1
  101. package/testing/testing.cjs +5 -32
  102. package/testing/testing.cjs.map +1 -1
  103. package/testing/testing.cjs.native.js +5 -32
  104. package/utilities/deprecation/index.d.ts +0 -3
  105. package/utilities/deprecation/index.js +4 -12
  106. package/utilities/deprecation/index.js.map +1 -1
  107. package/utilities/globals/globals.cjs +1 -1
  108. package/utilities/globals/globals.cjs.map +1 -1
  109. package/utilities/globals/globals.cjs.native.js +1 -1
  110. package/utilities/graphql/DocumentTransform.js +1 -1
  111. package/utilities/graphql/directives.js +7 -7
  112. package/utilities/graphql/fragments.js +3 -3
  113. package/utilities/graphql/getFromAST.js +8 -8
  114. package/utilities/graphql/storeUtils.js +1 -1
  115. package/utilities/graphql/transform.js +2 -2
  116. package/utilities/index.d.ts +2 -0
  117. package/utilities/index.js +1 -0
  118. package/utilities/index.js.map +1 -1
  119. package/utilities/utilities.cjs +54 -22
  120. package/utilities/utilities.cjs.map +1 -1
  121. package/utilities/utilities.cjs.native.js +54 -22
  122. package/version.js +1 -1
  123. package/.changeset/breezy-lions-rule.md +0 -5
  124. package/.changeset/chilled-cameras-scream.md +0 -5
  125. package/.changeset/great-jobs-fetch.md +0 -5
  126. package/.changeset/great-suns-cover.md +0 -5
  127. package/.changeset/perfect-donuts-roll.md +0 -5
  128. package/.changeset/popular-waves-drop.md +0 -5
  129. package/.changeset/pre.json +0 -20
  130. package/.changeset/shy-boxes-exercise.md +0 -5
  131. package/.changeset/shy-dragons-tease.md +0 -5
  132. package/.changeset/smooth-countries-cough.md +0 -5
  133. package/.changeset/spotty-walls-repair.md +0 -5
  134. package/.changeset/tidy-bulldogs-exercise.md +0 -5
@@ -22,7 +22,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
22
22
 
23
23
  var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
24
24
 
25
- var version = "3.14.0-rc.0";
25
+ var version = "3.14.1";
26
26
 
27
27
  function isNonNullObject(obj) {
28
28
  return obj !== null && typeof obj === "object";
@@ -195,33 +195,6 @@ function directiveIsNonreactive(dir) {
195
195
  return dir.name.value === "nonreactive";
196
196
  }
197
197
 
198
- var muteAllDeprecations = Symbol.for("apollo.deprecations");
199
- var global = globals.global;
200
- var slot = new optimism.Slot();
201
- function isMuted(name) {
202
- return global[muteAllDeprecations] || (slot.getValue() || []).includes(name);
203
- }
204
- function muteDeprecations(name) {
205
- var args = [];
206
- for (var _i = 1; _i < arguments.length; _i++) {
207
- args[_i - 1] = arguments[_i];
208
- }
209
- return slot.withValue.apply(slot, tslib.__spreadArray([Array.isArray(name) ? name : [name]], args, false));
210
- }
211
- function warnRemovedOption(options, name, callSite, recommendation) {
212
- if (recommendation === void 0) { recommendation = "Please remove this option."; }
213
- warnDeprecated(name, function () {
214
- if (name in options) {
215
- globalThis.__DEV__ !== false && globals.invariant.warn(104, callSite, name, recommendation);
216
- }
217
- });
218
- }
219
- function warnDeprecated(name, cb) {
220
- if (!isMuted(name)) {
221
- cb();
222
- }
223
- }
224
-
225
198
  var assign = Object.assign, hasOwnProperty$1 = Object.hasOwnProperty;
226
199
  var ObservableQuery = (function (_super) {
227
200
  tslib.__extends(ObservableQuery, _super);
@@ -230,10 +203,7 @@ var ObservableQuery = (function (_super) {
230
203
  var _this = this;
231
204
  var startedInactive = ObservableQuery.inactiveOnCreation.getValue();
232
205
  _this = _super.call(this, function (observer) {
233
- if (startedInactive) {
234
- queryManager["queries"].set(_this.queryId, queryInfo);
235
- startedInactive = false;
236
- }
206
+ _this._getOrCreateQuery();
237
207
  try {
238
208
  var subObserver = observer._subscription._observer;
239
209
  if (subObserver && !subObserver.error) {
@@ -262,6 +232,13 @@ var ObservableQuery = (function (_super) {
262
232
  _this.observers = new Set();
263
233
  _this.subscriptions = new Set();
264
234
  _this.dirty = false;
235
+ _this._getOrCreateQuery = function () {
236
+ if (startedInactive) {
237
+ queryManager["queries"].set(_this.queryId, queryInfo);
238
+ startedInactive = false;
239
+ }
240
+ return _this.queryManager.getOrCreateQuery(_this.queryId);
241
+ };
265
242
  _this.queryInfo = queryInfo;
266
243
  _this.queryManager = queryManager;
267
244
  _this.waitForOwnResult = skipCacheDataFor(options.fetchPolicy);
@@ -297,7 +274,7 @@ var ObservableQuery = (function (_super) {
297
274
  ObservableQuery.prototype.result = function () {
298
275
  var _this = this;
299
276
  if (globalThis.__DEV__ !== false) {
300
- warnDeprecated("observableQuery.result", function () {
277
+ utilities.warnDeprecated("observableQuery.result", function () {
301
278
  globalThis.__DEV__ !== false && globals.invariant.warn(23);
302
279
  });
303
280
  }
@@ -324,7 +301,7 @@ var ObservableQuery = (function (_super) {
324
301
  ObservableQuery.prototype.getCurrentFullResult = function (saveAsLastResult) {
325
302
  var _this = this;
326
303
  if (saveAsLastResult === void 0) { saveAsLastResult = true; }
327
- var lastResult = muteDeprecations("getLastResult", function () {
304
+ var lastResult = utilities.muteDeprecations("getLastResult", function () {
328
305
  return _this.getLastResult(true);
329
306
  });
330
307
  var networkStatus = this.queryInfo.networkStatus ||
@@ -402,7 +379,7 @@ var ObservableQuery = (function (_super) {
402
379
  };
403
380
  ObservableQuery.prototype.getLastResult = function (variablesMustMatch) {
404
381
  if (globalThis.__DEV__ !== false) {
405
- warnDeprecated("getLastResult", function () {
382
+ utilities.warnDeprecated("getLastResult", function () {
406
383
  globalThis.__DEV__ !== false && globals.invariant.warn(24);
407
384
  });
408
385
  }
@@ -410,7 +387,7 @@ var ObservableQuery = (function (_super) {
410
387
  };
411
388
  ObservableQuery.prototype.getLastError = function (variablesMustMatch) {
412
389
  if (globalThis.__DEV__ !== false) {
413
- warnDeprecated("getLastError", function () {
390
+ utilities.warnDeprecated("getLastError", function () {
414
391
  globalThis.__DEV__ !== false && globals.invariant.warn(25);
415
392
  });
416
393
  }
@@ -418,7 +395,7 @@ var ObservableQuery = (function (_super) {
418
395
  };
419
396
  ObservableQuery.prototype.resetLastResults = function () {
420
397
  if (globalThis.__DEV__ !== false) {
421
- warnDeprecated("resetLastResults", function () {
398
+ utilities.warnDeprecated("resetLastResults", function () {
422
399
  globalThis.__DEV__ !== false && globals.invariant.warn(26);
423
400
  });
424
401
  }
@@ -569,8 +546,8 @@ var ObservableQuery = (function (_super) {
569
546
  };
570
547
  ObservableQuery.prototype.setOptions = function (newOptions) {
571
548
  if (globalThis.__DEV__ !== false) {
572
- warnRemovedOption(newOptions, "canonizeResults", "setOptions");
573
- warnDeprecated("setOptions", function () {
549
+ utilities.warnRemovedOption(newOptions, "canonizeResults", "setOptions");
550
+ utilities.warnDeprecated("setOptions", function () {
574
551
  globalThis.__DEV__ !== false && globals.invariant.warn(31);
575
552
  });
576
553
  }
@@ -584,7 +561,7 @@ var ObservableQuery = (function (_super) {
584
561
  var _this = this;
585
562
  if (equal.equal(this.variables, variables)) {
586
563
  return this.observers.size ?
587
- muteDeprecations("observableQuery.result", function () { return _this.result(); })
564
+ utilities.muteDeprecations("observableQuery.result", function () { return _this.result(); })
588
565
  : Promise.resolve();
589
566
  }
590
567
  this.options.variables = variables;
@@ -649,7 +626,7 @@ var ObservableQuery = (function (_super) {
649
626
  return options.fetchPolicy;
650
627
  };
651
628
  ObservableQuery.prototype.fetch = function (options, newNetworkStatus, query) {
652
- var queryInfo = this.queryManager.getOrCreateQuery(this.queryId);
629
+ var queryInfo = this._getOrCreateQuery();
653
630
  queryInfo.setObservableQuery(this);
654
631
  return this.queryManager["fetchConcastWithInfo"](queryInfo, options, newNetworkStatus, query);
655
632
  };
@@ -700,7 +677,7 @@ var ObservableQuery = (function (_super) {
700
677
  ObservableQuery.prototype.updateLastResult = function (newResult, variables) {
701
678
  var _this = this;
702
679
  if (variables === void 0) { variables = this.variables; }
703
- var error = muteDeprecations("getLastError", function () {
680
+ var error = utilities.muteDeprecations("getLastError", function () {
704
681
  return _this.getLastError();
705
682
  });
706
683
  if (error && this.last && !equal.equal(variables, this.last.variables)) {
@@ -784,7 +761,7 @@ var ObservableQuery = (function (_super) {
784
761
  args[_i] = arguments[_i];
785
762
  }
786
763
  var last = this.last;
787
- muteDeprecations("resetLastResults", function () { return _this.resetLastResults(); });
764
+ utilities.muteDeprecations("resetLastResults", function () { return _this.resetLastResults(); });
788
765
  var subscription = this.subscribe.apply(this, args);
789
766
  this.last = last;
790
767
  return subscription;
@@ -795,7 +772,7 @@ var ObservableQuery = (function (_super) {
795
772
  };
796
773
  ObservableQuery.prototype.reportResult = function (result, variables) {
797
774
  var _this = this;
798
- var lastError = muteDeprecations("getLastError", function () {
775
+ var lastError = utilities.muteDeprecations("getLastError", function () {
799
776
  return _this.getLastError();
800
777
  });
801
778
  var isDifferent = this.isDifferentFromLastResult(result, variables);
@@ -808,7 +785,7 @@ var ObservableQuery = (function (_super) {
808
785
  };
809
786
  ObservableQuery.prototype.reportError = function (error, variables) {
810
787
  var _this = this;
811
- var errorResult = tslib.__assign(tslib.__assign({}, muteDeprecations("getLastResult", function () { return _this.getLastResult(); })), { error: error, errors: error.graphQLErrors, networkStatus: exports.NetworkStatus.error, loading: false });
788
+ var errorResult = tslib.__assign(tslib.__assign({}, utilities.muteDeprecations("getLastResult", function () { return _this.getLastResult(); })), { error: error, errors: error.graphQLErrors, networkStatus: exports.NetworkStatus.error, loading: false });
812
789
  this.updateLastResult(errorResult, variables);
813
790
  utilities.iterateObserversSafely(this.observers, "error", (this.last.error = error));
814
791
  };
@@ -978,7 +955,7 @@ var QueryInfo = (function () {
978
955
  if (oq && oq.options.fetchPolicy === "no-cache") {
979
956
  return { complete: false };
980
957
  }
981
- var diff = muteDeprecations("canonizeResults", function () {
958
+ var diff = utilities.muteDeprecations("canonizeResults", function () {
982
959
  return _this.cache.diff(options);
983
960
  });
984
961
  this.updateLastDiff(diff, options);
@@ -1010,7 +987,7 @@ var QueryInfo = (function () {
1010
987
  var oldDiff = this.lastDiff && this.lastDiff.diff;
1011
988
  if (diff &&
1012
989
  !diff.complete &&
1013
- muteDeprecations("getLastError", function () { var _a; return (_a = _this.observableQuery) === null || _a === void 0 ? void 0 : _a.getLastError(); })) {
990
+ utilities.muteDeprecations("getLastError", function () { var _a; return (_a = _this.observableQuery) === null || _a === void 0 ? void 0 : _a.getLastError(); })) {
1014
991
  return;
1015
992
  }
1016
993
  this.updateLastDiff(diff);
@@ -1106,7 +1083,7 @@ var QueryInfo = (function () {
1106
1083
  }
1107
1084
  }
1108
1085
  var diffOptions = _this.getDiffOptions(options.variables);
1109
- var diff = muteDeprecations("canonizeResults", function () {
1086
+ var diff = utilities.muteDeprecations("canonizeResults", function () {
1110
1087
  return cache.diff(diffOptions);
1111
1088
  });
1112
1089
  if (!_this.stopped && equal.equal(_this.variables, options.variables)) {
@@ -1676,7 +1653,7 @@ var QueryManager = (function () {
1676
1653
  var observableQueryPromises = [];
1677
1654
  this.getObservableQueries(includeStandby ? "all" : "active").forEach(function (observableQuery, queryId) {
1678
1655
  var fetchPolicy = observableQuery.options.fetchPolicy;
1679
- muteDeprecations("resetLastResults", function () {
1656
+ utilities.muteDeprecations("resetLastResults", function () {
1680
1657
  return observableQuery.resetLastResults();
1681
1658
  });
1682
1659
  if (includeStandby ||
@@ -1956,7 +1933,7 @@ var QueryManager = (function () {
1956
1933
  var result;
1957
1934
  if (onQueryUpdated) {
1958
1935
  if (!diff) {
1959
- diff = muteDeprecations("canonizeResults", function () {
1936
+ diff = utilities.muteDeprecations("canonizeResults", function () {
1960
1937
  return _this.cache.diff(oq["queryInfo"]["getDiffOptions"]());
1961
1938
  });
1962
1939
  }
@@ -2528,13 +2505,13 @@ var ApolloClient = (function () {
2528
2505
  var uri = options.uri, credentials = options.credentials, headers = options.headers, cache = options.cache, documentTransform = options.documentTransform, _d = options.ssrMode, ssrMode = _d === void 0 ? false : _d, _e = options.ssrForceFetchDelay, ssrForceFetchDelay = _e === void 0 ? 0 : _e,
2529
2506
  connectToDevTools = options.connectToDevTools, _f = options.queryDeduplication, queryDeduplication = _f === void 0 ? true : _f, defaultOptions = options.defaultOptions, defaultContext = options.defaultContext, _g = options.assumeImmutableResults, assumeImmutableResults = _g === void 0 ? cache.assumeImmutableResults : _g, resolvers = options.resolvers, typeDefs = options.typeDefs, fragmentMatcher = options.fragmentMatcher, clientAwareness = options.clientAwareness, clientAwarenessName = options.name, clientAwarenessVersion = options.version, devtools = options.devtools, dataMasking = options.dataMasking;
2530
2507
  if (globalThis.__DEV__ !== false) {
2531
- warnRemovedOption(options, "connectToDevTools", "ApolloClient", "Please use `devtools.enabled` instead.");
2532
- warnRemovedOption(options, "uri", "ApolloClient", "Please initialize an instance of `HttpLink` with `uri` instead.");
2533
- warnRemovedOption(options, "credentials", "ApolloClient", "Please initialize an instance of `HttpLink` with `credentials` instead.");
2534
- warnRemovedOption(options, "headers", "ApolloClient", "Please initialize an instance of `HttpLink` with `headers` instead.");
2535
- warnRemovedOption(options, "name", "ApolloClient", "Please use the `clientAwareness.name` option instead.");
2536
- warnRemovedOption(options, "version", "ApolloClient", "Please use the `clientAwareness.version` option instead.");
2537
- warnRemovedOption(options, "typeDefs", "ApolloClient");
2508
+ utilities.warnRemovedOption(options, "connectToDevTools", "ApolloClient", "Please use `devtools.enabled` instead.");
2509
+ utilities.warnRemovedOption(options, "uri", "ApolloClient", "Please initialize an instance of `HttpLink` with `uri` instead.");
2510
+ utilities.warnRemovedOption(options, "credentials", "ApolloClient", "Please initialize an instance of `HttpLink` with `credentials` instead.");
2511
+ utilities.warnRemovedOption(options, "headers", "ApolloClient", "Please initialize an instance of `HttpLink` with `headers` instead.");
2512
+ utilities.warnRemovedOption(options, "name", "ApolloClient", "Please use the `clientAwareness.name` option instead.");
2513
+ utilities.warnRemovedOption(options, "version", "ApolloClient", "Please use the `clientAwareness.version` option instead.");
2514
+ utilities.warnRemovedOption(options, "typeDefs", "ApolloClient");
2538
2515
  if (!options.link) {
2539
2516
  globalThis.__DEV__ !== false && globals.invariant.warn(17);
2540
2517
  }
@@ -2672,8 +2649,8 @@ var ApolloClient = (function () {
2672
2649
  options = tslib.__assign(tslib.__assign({}, options), { fetchPolicy: "cache-first" });
2673
2650
  }
2674
2651
  if (globalThis.__DEV__ !== false) {
2675
- warnRemovedOption(options, "canonizeResults", "client.watchQuery");
2676
- warnRemovedOption(options, "partialRefetch", "client.watchQuery");
2652
+ utilities.warnRemovedOption(options, "canonizeResults", "client.watchQuery");
2653
+ utilities.warnRemovedOption(options, "partialRefetch", "client.watchQuery");
2677
2654
  }
2678
2655
  return this.queryManager.watchQuery(options);
2679
2656
  };
@@ -2686,8 +2663,8 @@ var ApolloClient = (function () {
2686
2663
  options = tslib.__assign(tslib.__assign({}, options), { fetchPolicy: "cache-first" });
2687
2664
  }
2688
2665
  if (globalThis.__DEV__ !== false) {
2689
- warnRemovedOption(options, "canonizeResults", "client.query");
2690
- warnRemovedOption(options, "notifyOnNetworkStatusChange", "client.query", "This option does not affect `client.query` and can be safely removed.");
2666
+ utilities.warnRemovedOption(options, "canonizeResults", "client.query");
2667
+ utilities.warnRemovedOption(options, "notifyOnNetworkStatusChange", "client.query", "This option does not affect `client.query` and can be safely removed.");
2691
2668
  if (options.fetchPolicy === "standby") {
2692
2669
  globalThis.__DEV__ !== false && globals.invariant.warn(19);
2693
2670
  }
package/dev/dev.cjs CHANGED
@@ -196,52 +196,52 @@ const errorCodes =
196
196
  message: "To access the wrapped instance, you need to specify " +
197
197
  "{ withRef: true } in the options"
198
198
  },
199
- 79: {
199
+ 78: {
200
200
  file: "@apollo/client/react/hooks/useApolloClient.js",
201
201
  condition: "!!client",
202
202
  message: 'Could not find "client" in the context or passed in as an option. ' +
203
203
  "Wrap the root component in an <ApolloProvider>, or pass an ApolloClient " +
204
204
  "instance in via options."
205
205
  },
206
- 82: {
206
+ 81: {
207
207
  file: "@apollo/client/react/hooks/useLoadableQuery.js",
208
208
  condition: "!calledDuringRender()",
209
209
  message: "useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook."
210
210
  },
211
- 83: {
211
+ 82: {
212
212
  file: "@apollo/client/react/hooks/useLoadableQuery.js",
213
213
  condition: "internalQueryRef",
214
214
  message: "The query has not been loaded. Please load the query."
215
215
  },
216
- 89: {
216
+ 88: {
217
217
  file: "@apollo/client/react/hooks/useSubscription.js",
218
218
  condition: "!optionsRef.current.skip",
219
219
  message: "A subscription that is skipped cannot be restarted."
220
220
  },
221
- 90: {
221
+ 89: {
222
222
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
223
223
  condition: "supportedFetchPolicies.includes(fetchPolicy)",
224
224
  message: "The fetch policy `%s` is not supported with suspense."
225
225
  },
226
- 93: {
226
+ 92: {
227
227
  file: "@apollo/client/react/internal/cache/QueryReference.js",
228
228
  condition: "!queryRef || QUERY_REFERENCE_SYMBOL in queryRef",
229
229
  message: "Expected a QueryRef object, but got something else instead."
230
230
  },
231
- 95: {
231
+ 94: {
232
232
  file: "@apollo/client/react/parser/index.js",
233
233
  condition: "!!document && !!document.kind",
234
234
  message: "Argument of %s passed to parser was not a valid GraphQL " +
235
235
  "DocumentNode. You may need to use 'graphql-tag' or another method " +
236
236
  "to convert your operation into a document"
237
237
  },
238
- 96: {
238
+ 95: {
239
239
  file: "@apollo/client/react/parser/index.js",
240
240
  condition: "!fragments.length ||\n queries.length ||\n mutations.length ||\n subscriptions.length",
241
241
  message: "Passing only a fragment to 'graphql' is not yet supported. " +
242
242
  "You must include a query, subscription or mutation as well"
243
243
  },
244
- 97: {
244
+ 96: {
245
245
  file: "@apollo/client/react/parser/index.js",
246
246
  condition: "queries.length + mutations.length + subscriptions.length <= 1",
247
247
  message: "react-apollo only supports a query, subscription, or a mutation per HOC. " +
@@ -249,107 +249,107 @@ const errorCodes =
249
249
  "subscriptions and %s mutations. " +
250
250
  "You can use 'compose' to join multiple operation types to a component"
251
251
  },
252
- 98: {
252
+ 97: {
253
253
  file: "@apollo/client/react/parser/index.js",
254
254
  condition: "definitions.length === 1",
255
255
  message: "react-apollo only supports one definition per HOC. %s had " +
256
256
  "%s definitions. " +
257
257
  "You can use 'compose' to join multiple operation types to a component"
258
258
  },
259
- 99: {
259
+ 98: {
260
260
  file: "@apollo/client/react/parser/index.js",
261
261
  condition: "operation.type === type",
262
262
  message: "Running a %s requires a graphql " + "%s, but a %s was used instead."
263
263
  },
264
- 102: {
264
+ 101: {
265
265
  file: "@apollo/client/testing/core/mocking/mockLink.js",
266
266
  condition: "queryWithoutClientOnlyDirectives",
267
267
  message: "query is required"
268
268
  },
269
- 103: {
269
+ 102: {
270
270
  file: "@apollo/client/testing/core/mocking/mockLink.js",
271
271
  condition: "mockedResponse.maxUsageCount > 0",
272
272
  message: "Mock response maxUsageCount must be greater than 0, %s given"
273
273
  },
274
- 105: {
274
+ 104: {
275
275
  file: "@apollo/client/utilities/graphql/DocumentTransform.js",
276
276
  condition: "Array.isArray(cacheKeys)",
277
277
  message: "`getCacheKey` must return an array or undefined"
278
278
  },
279
- 106: {
279
+ 105: {
280
280
  file: "@apollo/client/utilities/graphql/directives.js",
281
281
  condition: "evaledValue !== void 0",
282
282
  message: "Invalid variable referenced in @%s directive."
283
283
  },
284
- 107: {
284
+ 106: {
285
285
  file: "@apollo/client/utilities/graphql/directives.js",
286
286
  condition: "directiveArguments && directiveArguments.length === 1",
287
287
  message: "Incorrect number of arguments for the @%s directive."
288
288
  },
289
- 108: {
289
+ 107: {
290
290
  file: "@apollo/client/utilities/graphql/directives.js",
291
291
  condition: "ifArgument.name && ifArgument.name.value === \"if\"",
292
292
  message: "Invalid argument for the @%s directive."
293
293
  },
294
- 109: {
294
+ 108: {
295
295
  file: "@apollo/client/utilities/graphql/directives.js",
296
296
  condition: "ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\")",
297
297
  message: "Argument for the @%s directive must be a variable or a boolean value."
298
298
  },
299
- 113: {
299
+ 112: {
300
300
  file: "@apollo/client/utilities/graphql/fragments.js",
301
301
  message: "Found a %s operation%s. " +
302
302
  "No operations are allowed when using a fragment as a query. Only fragments are allowed."
303
303
  },
304
- 114: {
304
+ 113: {
305
305
  file: "@apollo/client/utilities/graphql/fragments.js",
306
306
  condition: "fragments.length === 1",
307
307
  message: "Found %s fragments. `fragmentName` must be provided when there is not exactly 1 fragment."
308
308
  },
309
- 115: {
309
+ 114: {
310
310
  file: "@apollo/client/utilities/graphql/fragments.js",
311
311
  condition: "fragment",
312
312
  message: "No fragment named %s"
313
313
  },
314
- 116: {
314
+ 115: {
315
315
  file: "@apollo/client/utilities/graphql/getFromAST.js",
316
316
  condition: "doc && doc.kind === \"Document\"",
317
317
  message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
318
318
  },
319
- 117: {
319
+ 116: {
320
320
  file: "@apollo/client/utilities/graphql/getFromAST.js",
321
321
  message: "Schema type definitions not allowed in queries. Found: \"%s\""
322
322
  },
323
- 118: {
323
+ 117: {
324
324
  file: "@apollo/client/utilities/graphql/getFromAST.js",
325
325
  condition: "operations.length <= 1",
326
326
  message: "Ambiguous GraphQL document: contains %s operations"
327
327
  },
328
- 119: {
328
+ 118: {
329
329
  file: "@apollo/client/utilities/graphql/getFromAST.js",
330
330
  condition: "queryDef && queryDef.operation === \"query\"",
331
331
  message: "Must contain a query definition."
332
332
  },
333
- 120: {
333
+ 119: {
334
334
  file: "@apollo/client/utilities/graphql/getFromAST.js",
335
335
  condition: "doc.kind === \"Document\"",
336
336
  message: "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql"
337
337
  },
338
- 121: {
338
+ 120: {
339
339
  file: "@apollo/client/utilities/graphql/getFromAST.js",
340
340
  condition: "doc.definitions.length <= 1",
341
341
  message: "Fragment must have exactly one definition."
342
342
  },
343
- 122: {
343
+ 121: {
344
344
  file: "@apollo/client/utilities/graphql/getFromAST.js",
345
345
  condition: "fragmentDef.kind === \"FragmentDefinition\"",
346
346
  message: "Must be a fragment definition."
347
347
  },
348
- 123: {
348
+ 122: {
349
349
  file: "@apollo/client/utilities/graphql/getFromAST.js",
350
350
  message: "Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."
351
351
  },
352
- 124: {
352
+ 123: {
353
353
  file: "@apollo/client/utilities/graphql/storeUtils.js",
354
354
  message: "The inline argument \"%s\" of kind \"%s\"" +
355
355
  "is not supported. Use variables instead of inline arguments to " +
@@ -511,71 +511,67 @@ const devWarn = {
511
511
  file: "@apollo/client/react/hoc/subscription-hoc.js",
512
512
  message: "[withSubscription]: The `withSubscription` higher order component is deprecated and will be removed in Apollo Client 4.0. Please switch to an available React hook such as `useSubscription`."
513
513
  },
514
- 78: {
515
- file: "@apollo/client/react/hooks/internal/useWarnRemovedOption.js",
516
- message: "[%s]: `%s` is a deprecated hook option and will be removed in Apollo Client 4.0. %s"
517
- },
518
- 80: {
514
+ 79: {
519
515
  file: "@apollo/client/react/hooks/useLazyQuery.js",
520
516
  message: "[useLazyQuery]: `reobserve` is deprecated and will removed in Apollo Client 4.0. Please change options by rerendering `useLazyQuery` with new options."
521
517
  },
522
- 81: {
518
+ 80: {
523
519
  file: "@apollo/client/react/hooks/useLazyQuery.js",
524
520
  message: "[useLazyQuery]: Calling `execute` in render will throw in Apollo Client 4.0. Either switch to `useQuery` to run the query during render or move the `execute` call inside of `useEffect`."
525
521
  },
526
- 84: {
522
+ 83: {
527
523
  file: "@apollo/client/react/hooks/useQuery.js",
528
524
  message: "[useQuery]: `reobserve` is deprecated and will removed in Apollo Client 4.0. Please change options by rerendering `useQuery` with new options."
529
525
  },
530
- 85: {
526
+ 84: {
531
527
  file: "@apollo/client/react/hooks/useSubscription.js",
532
528
  message: "'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used."
533
529
  },
534
- 86: {
530
+ 85: {
535
531
  file: "@apollo/client/react/hooks/useSubscription.js",
536
532
  message: "[useSubscription]: `onSubscriptionData` is deprecated and will be removed in Apollo Client 4.0. Please use the 'onData' option instead."
537
533
  },
538
- 87: {
534
+ 86: {
539
535
  file: "@apollo/client/react/hooks/useSubscription.js",
540
536
  message: "'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used."
541
537
  },
542
- 88: {
538
+ 87: {
543
539
  file: "@apollo/client/react/hooks/useSubscription.js",
544
540
  message: "[useSubscription]: `onSubscriptionComplete` is deprecated and will be removed in Apollo Client 4.0. Please use the 'onComplete' option instead."
545
541
  },
546
- 91: {
542
+ 90: {
547
543
  file: "@apollo/client/react/hooks/useSuspenseQuery.js",
548
544
  message: "Using `returnPartialData` with a `no-cache` fetch policy has no effect. To read partial data from the cache, consider using an alternate fetch policy."
549
545
  },
550
- 94: {
546
+ 93: {
551
547
  file: "@apollo/client/react/parser/index.js",
552
548
  message: "[parser]: `parser` is deprecated and will be removed in Apollo Client 4.0. Please remove all usages of `parser`."
553
549
  },
554
- 100: {
550
+ 99: {
555
551
  file: "@apollo/client/testing/core/mocking/mockLink.js",
556
552
  message: "[MockLink]: `newData` is deprecated and will be removed in Apollo Client 4.0. Please use the `result` option with a callback function and set the `maxUsageCount` option to `Number.POSITIVE_INFINITY`.\n\nFound `newData` on response:\n%o"
557
553
  },
558
- 101: {
554
+ 100: {
559
555
  file: "@apollo/client/testing/core/mocking/mockLink.js",
560
556
  message: "[MockLink]: Apollo Client 4.0 will throw when mocking client-only query '%s'. Please ensure the query has at least 1 non-client field."
561
557
  },
562
- 104: {
558
+ 103: {
563
559
  file: "@apollo/client/utilities/deprecation/index.js",
564
560
  message: "[%s]: `%s` is deprecated and will be removed in Apollo Client 4.0. %s"
565
561
  },
566
- 110: {
562
+ 109: {
567
563
  file: "@apollo/client/utilities/graphql/directives.js",
568
564
  message: "@unmask 'mode' argument does not support variables."
569
565
  },
570
- 111: {
566
+ 110: {
571
567
  file: "@apollo/client/utilities/graphql/directives.js",
572
568
  message: "@unmask 'mode' argument must be of type string."
573
569
  },
574
- 112: {
570
+ 111: {
575
571
  file: "@apollo/client/utilities/graphql/directives.js",
576
572
  message: "@unmask 'mode' argument does not recognize value '%s'."
577
573
  },
578
- 126: {
574
+ 125: {
579
575
  file: "@apollo/client/utilities/graphql/transform.js",
580
576
  message: "Removing an @connection directive even though it does not have a key. " +
581
577
  "You may want to use the key parameter to specify a store key."
@@ -594,17 +590,17 @@ const devError = {
594
590
  file: "@apollo/client/core/ObservableQuery.js",
595
591
  message: "Unhandled error"
596
592
  },
597
- 92: {
593
+ 91: {
598
594
  file: "@apollo/client/react/hooks/useSyncExternalStore.js",
599
595
  message: "The result of getSnapshot should be cached to avoid an infinite loop"
600
596
  },
601
- 125: {
597
+ 124: {
602
598
  file: "@apollo/client/utilities/graphql/transform.js",
603
599
  message: "Could not find operation or fragment"
604
600
  }
605
601
  };
606
602
 
607
- var version = "3.14.0-rc.0";
603
+ var version = "3.14.1";
608
604
 
609
605
  function maybe(thunk) {
610
606
  try {