@apollo/client 3.14.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 (121) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/apollo-client.cjs +76 -72
  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.js +1 -1
  15. package/core/ObservableQuery.js.map +1 -1
  16. package/core/QueryInfo.js +1 -1
  17. package/core/QueryInfo.js.map +1 -1
  18. package/core/QueryManager.js +1 -1
  19. package/core/QueryManager.js.map +1 -1
  20. package/core/core.cjs +29 -56
  21. package/core/core.cjs.map +1 -1
  22. package/core/core.cjs.native.js +29 -56
  23. package/dev/dev.cjs +49 -53
  24. package/dev/dev.cjs.map +1 -1
  25. package/dev/dev.cjs.native.js +49 -53
  26. package/invariantErrorCodes.js +48 -53
  27. package/link/core/ApolloLink.js +1 -1
  28. package/link/core/ApolloLink.js.map +1 -1
  29. package/link/core/core.cjs +1 -15
  30. package/link/core/core.cjs.map +1 -1
  31. package/link/core/core.cjs.native.js +1 -15
  32. package/package.json +1 -1
  33. package/react/components/components.cjs +2 -14
  34. package/react/components/components.cjs.map +1 -1
  35. package/react/components/components.cjs.native.js +2 -14
  36. package/react/hoc/graphql.js +1 -1
  37. package/react/hoc/graphql.js.map +1 -1
  38. package/react/hoc/hoc.cjs +12 -31
  39. package/react/hoc/hoc.cjs.map +1 -1
  40. package/react/hoc/hoc.cjs.native.js +12 -31
  41. package/react/hoc/mutation-hoc.js +1 -1
  42. package/react/hoc/mutation-hoc.js.map +1 -1
  43. package/react/hoc/query-hoc.js +1 -1
  44. package/react/hoc/query-hoc.js.map +1 -1
  45. package/react/hoc/subscription-hoc.js +1 -1
  46. package/react/hoc/subscription-hoc.js.map +1 -1
  47. package/react/hooks/hooks.cjs +26 -52
  48. package/react/hooks/hooks.cjs.map +1 -1
  49. package/react/hooks/hooks.cjs.native.js +26 -52
  50. package/react/hooks/internal/useWarnRemoved.d.ts +1 -1
  51. package/react/hooks/internal/useWarnRemoved.js +1 -1
  52. package/react/hooks/internal/useWarnRemoved.js.map +1 -1
  53. package/react/hooks/internal/useWarnRemovedOption.d.ts +2 -1
  54. package/react/hooks/internal/useWarnRemovedOption.js +7 -5
  55. package/react/hooks/internal/useWarnRemovedOption.js.map +1 -1
  56. package/react/hooks/useApolloClient.js +1 -1
  57. package/react/hooks/useBackgroundQuery.js +1 -1
  58. package/react/hooks/useBackgroundQuery.js.map +1 -1
  59. package/react/hooks/useFragment.js +1 -1
  60. package/react/hooks/useFragment.js.map +1 -1
  61. package/react/hooks/useLazyQuery.js +3 -3
  62. package/react/hooks/useLazyQuery.js.map +1 -1
  63. package/react/hooks/useLoadableQuery.js +3 -3
  64. package/react/hooks/useLoadableQuery.js.map +1 -1
  65. package/react/hooks/useQuery.js +3 -3
  66. package/react/hooks/useQuery.js.map +1 -1
  67. package/react/hooks/useSubscription.js +3 -3
  68. package/react/hooks/useSuspenseQuery.js +3 -3
  69. package/react/hooks/useSuspenseQuery.js.map +1 -1
  70. package/react/hooks/useSyncExternalStore.js +1 -1
  71. package/react/internal/cache/QueryReference.js +2 -2
  72. package/react/internal/cache/QueryReference.js.map +1 -1
  73. package/react/internal/internal.cjs +3 -14
  74. package/react/internal/internal.cjs.map +1 -1
  75. package/react/internal/internal.cjs.native.js +3 -14
  76. package/react/parser/index.js +7 -7
  77. package/react/parser/index.js.map +1 -1
  78. package/react/parser/parser.cjs +9 -29
  79. package/react/parser/parser.cjs.map +1 -1
  80. package/react/parser/parser.cjs.native.js +9 -29
  81. package/react/query-preloader/createQueryPreloader.js +1 -1
  82. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  83. package/react/react.cjs +4 -31
  84. package/react/react.cjs.map +1 -1
  85. package/react/react.cjs.native.js +4 -31
  86. package/testing/core/core.cjs +4 -4
  87. package/testing/core/core.cjs.map +1 -1
  88. package/testing/core/core.cjs.native.js +4 -4
  89. package/testing/core/mocking/mockLink.d.ts +13 -0
  90. package/testing/core/mocking/mockLink.js +4 -4
  91. package/testing/core/mocking/mockLink.js.map +1 -1
  92. package/testing/internal/disposables/index.d.ts +1 -0
  93. package/testing/internal/disposables/index.js +1 -0
  94. package/testing/internal/disposables/index.js.map +1 -1
  95. package/testing/internal/disposables/withMutedDeprecations.d.ts +4 -0
  96. package/testing/internal/disposables/withMutedDeprecations.js +13 -0
  97. package/testing/internal/disposables/withMutedDeprecations.js.map +1 -0
  98. package/testing/react/MockedProvider.js +1 -1
  99. package/testing/react/MockedProvider.js.map +1 -1
  100. package/testing/testing.cjs +5 -32
  101. package/testing/testing.cjs.map +1 -1
  102. package/testing/testing.cjs.native.js +5 -32
  103. package/utilities/deprecation/index.d.ts +0 -3
  104. package/utilities/deprecation/index.js +4 -12
  105. package/utilities/deprecation/index.js.map +1 -1
  106. package/utilities/globals/globals.cjs +1 -1
  107. package/utilities/globals/globals.cjs.map +1 -1
  108. package/utilities/globals/globals.cjs.native.js +1 -1
  109. package/utilities/graphql/DocumentTransform.js +1 -1
  110. package/utilities/graphql/directives.js +7 -7
  111. package/utilities/graphql/fragments.js +3 -3
  112. package/utilities/graphql/getFromAST.js +8 -8
  113. package/utilities/graphql/storeUtils.js +1 -1
  114. package/utilities/graphql/transform.js +2 -2
  115. package/utilities/index.d.ts +2 -0
  116. package/utilities/index.js +1 -0
  117. package/utilities/index.js.map +1 -1
  118. package/utilities/utilities.cjs +54 -22
  119. package/utilities/utilities.cjs.map +1 -1
  120. package/utilities/utilities.cjs.native.js +54 -22
  121. package/version.js +1 -1
@@ -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";
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);
@@ -301,7 +274,7 @@ var ObservableQuery = (function (_super) {
301
274
  ObservableQuery.prototype.result = function () {
302
275
  var _this = this;
303
276
  if (globalThis.__DEV__ !== false) {
304
- warnDeprecated("observableQuery.result", function () {
277
+ utilities.warnDeprecated("observableQuery.result", function () {
305
278
  globalThis.__DEV__ !== false && globals.invariant.warn(23);
306
279
  });
307
280
  }
@@ -328,7 +301,7 @@ var ObservableQuery = (function (_super) {
328
301
  ObservableQuery.prototype.getCurrentFullResult = function (saveAsLastResult) {
329
302
  var _this = this;
330
303
  if (saveAsLastResult === void 0) { saveAsLastResult = true; }
331
- var lastResult = muteDeprecations("getLastResult", function () {
304
+ var lastResult = utilities.muteDeprecations("getLastResult", function () {
332
305
  return _this.getLastResult(true);
333
306
  });
334
307
  var networkStatus = this.queryInfo.networkStatus ||
@@ -406,7 +379,7 @@ var ObservableQuery = (function (_super) {
406
379
  };
407
380
  ObservableQuery.prototype.getLastResult = function (variablesMustMatch) {
408
381
  if (globalThis.__DEV__ !== false) {
409
- warnDeprecated("getLastResult", function () {
382
+ utilities.warnDeprecated("getLastResult", function () {
410
383
  globalThis.__DEV__ !== false && globals.invariant.warn(24);
411
384
  });
412
385
  }
@@ -414,7 +387,7 @@ var ObservableQuery = (function (_super) {
414
387
  };
415
388
  ObservableQuery.prototype.getLastError = function (variablesMustMatch) {
416
389
  if (globalThis.__DEV__ !== false) {
417
- warnDeprecated("getLastError", function () {
390
+ utilities.warnDeprecated("getLastError", function () {
418
391
  globalThis.__DEV__ !== false && globals.invariant.warn(25);
419
392
  });
420
393
  }
@@ -422,7 +395,7 @@ var ObservableQuery = (function (_super) {
422
395
  };
423
396
  ObservableQuery.prototype.resetLastResults = function () {
424
397
  if (globalThis.__DEV__ !== false) {
425
- warnDeprecated("resetLastResults", function () {
398
+ utilities.warnDeprecated("resetLastResults", function () {
426
399
  globalThis.__DEV__ !== false && globals.invariant.warn(26);
427
400
  });
428
401
  }
@@ -573,8 +546,8 @@ var ObservableQuery = (function (_super) {
573
546
  };
574
547
  ObservableQuery.prototype.setOptions = function (newOptions) {
575
548
  if (globalThis.__DEV__ !== false) {
576
- warnRemovedOption(newOptions, "canonizeResults", "setOptions");
577
- warnDeprecated("setOptions", function () {
549
+ utilities.warnRemovedOption(newOptions, "canonizeResults", "setOptions");
550
+ utilities.warnDeprecated("setOptions", function () {
578
551
  globalThis.__DEV__ !== false && globals.invariant.warn(31);
579
552
  });
580
553
  }
@@ -588,7 +561,7 @@ var ObservableQuery = (function (_super) {
588
561
  var _this = this;
589
562
  if (equal.equal(this.variables, variables)) {
590
563
  return this.observers.size ?
591
- muteDeprecations("observableQuery.result", function () { return _this.result(); })
564
+ utilities.muteDeprecations("observableQuery.result", function () { return _this.result(); })
592
565
  : Promise.resolve();
593
566
  }
594
567
  this.options.variables = variables;
@@ -704,7 +677,7 @@ var ObservableQuery = (function (_super) {
704
677
  ObservableQuery.prototype.updateLastResult = function (newResult, variables) {
705
678
  var _this = this;
706
679
  if (variables === void 0) { variables = this.variables; }
707
- var error = muteDeprecations("getLastError", function () {
680
+ var error = utilities.muteDeprecations("getLastError", function () {
708
681
  return _this.getLastError();
709
682
  });
710
683
  if (error && this.last && !equal.equal(variables, this.last.variables)) {
@@ -788,7 +761,7 @@ var ObservableQuery = (function (_super) {
788
761
  args[_i] = arguments[_i];
789
762
  }
790
763
  var last = this.last;
791
- muteDeprecations("resetLastResults", function () { return _this.resetLastResults(); });
764
+ utilities.muteDeprecations("resetLastResults", function () { return _this.resetLastResults(); });
792
765
  var subscription = this.subscribe.apply(this, args);
793
766
  this.last = last;
794
767
  return subscription;
@@ -799,7 +772,7 @@ var ObservableQuery = (function (_super) {
799
772
  };
800
773
  ObservableQuery.prototype.reportResult = function (result, variables) {
801
774
  var _this = this;
802
- var lastError = muteDeprecations("getLastError", function () {
775
+ var lastError = utilities.muteDeprecations("getLastError", function () {
803
776
  return _this.getLastError();
804
777
  });
805
778
  var isDifferent = this.isDifferentFromLastResult(result, variables);
@@ -812,7 +785,7 @@ var ObservableQuery = (function (_super) {
812
785
  };
813
786
  ObservableQuery.prototype.reportError = function (error, variables) {
814
787
  var _this = this;
815
- 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 });
816
789
  this.updateLastResult(errorResult, variables);
817
790
  utilities.iterateObserversSafely(this.observers, "error", (this.last.error = error));
818
791
  };
@@ -982,7 +955,7 @@ var QueryInfo = (function () {
982
955
  if (oq && oq.options.fetchPolicy === "no-cache") {
983
956
  return { complete: false };
984
957
  }
985
- var diff = muteDeprecations("canonizeResults", function () {
958
+ var diff = utilities.muteDeprecations("canonizeResults", function () {
986
959
  return _this.cache.diff(options);
987
960
  });
988
961
  this.updateLastDiff(diff, options);
@@ -1014,7 +987,7 @@ var QueryInfo = (function () {
1014
987
  var oldDiff = this.lastDiff && this.lastDiff.diff;
1015
988
  if (diff &&
1016
989
  !diff.complete &&
1017
- 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(); })) {
1018
991
  return;
1019
992
  }
1020
993
  this.updateLastDiff(diff);
@@ -1110,7 +1083,7 @@ var QueryInfo = (function () {
1110
1083
  }
1111
1084
  }
1112
1085
  var diffOptions = _this.getDiffOptions(options.variables);
1113
- var diff = muteDeprecations("canonizeResults", function () {
1086
+ var diff = utilities.muteDeprecations("canonizeResults", function () {
1114
1087
  return cache.diff(diffOptions);
1115
1088
  });
1116
1089
  if (!_this.stopped && equal.equal(_this.variables, options.variables)) {
@@ -1680,7 +1653,7 @@ var QueryManager = (function () {
1680
1653
  var observableQueryPromises = [];
1681
1654
  this.getObservableQueries(includeStandby ? "all" : "active").forEach(function (observableQuery, queryId) {
1682
1655
  var fetchPolicy = observableQuery.options.fetchPolicy;
1683
- muteDeprecations("resetLastResults", function () {
1656
+ utilities.muteDeprecations("resetLastResults", function () {
1684
1657
  return observableQuery.resetLastResults();
1685
1658
  });
1686
1659
  if (includeStandby ||
@@ -1960,7 +1933,7 @@ var QueryManager = (function () {
1960
1933
  var result;
1961
1934
  if (onQueryUpdated) {
1962
1935
  if (!diff) {
1963
- diff = muteDeprecations("canonizeResults", function () {
1936
+ diff = utilities.muteDeprecations("canonizeResults", function () {
1964
1937
  return _this.cache.diff(oq["queryInfo"]["getDiffOptions"]());
1965
1938
  });
1966
1939
  }
@@ -2532,13 +2505,13 @@ var ApolloClient = (function () {
2532
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,
2533
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;
2534
2507
  if (globalThis.__DEV__ !== false) {
2535
- warnRemovedOption(options, "connectToDevTools", "ApolloClient", "Please use `devtools.enabled` instead.");
2536
- warnRemovedOption(options, "uri", "ApolloClient", "Please initialize an instance of `HttpLink` with `uri` instead.");
2537
- warnRemovedOption(options, "credentials", "ApolloClient", "Please initialize an instance of `HttpLink` with `credentials` instead.");
2538
- warnRemovedOption(options, "headers", "ApolloClient", "Please initialize an instance of `HttpLink` with `headers` instead.");
2539
- warnRemovedOption(options, "name", "ApolloClient", "Please use the `clientAwareness.name` option instead.");
2540
- warnRemovedOption(options, "version", "ApolloClient", "Please use the `clientAwareness.version` option instead.");
2541
- 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");
2542
2515
  if (!options.link) {
2543
2516
  globalThis.__DEV__ !== false && globals.invariant.warn(17);
2544
2517
  }
@@ -2676,8 +2649,8 @@ var ApolloClient = (function () {
2676
2649
  options = tslib.__assign(tslib.__assign({}, options), { fetchPolicy: "cache-first" });
2677
2650
  }
2678
2651
  if (globalThis.__DEV__ !== false) {
2679
- warnRemovedOption(options, "canonizeResults", "client.watchQuery");
2680
- warnRemovedOption(options, "partialRefetch", "client.watchQuery");
2652
+ utilities.warnRemovedOption(options, "canonizeResults", "client.watchQuery");
2653
+ utilities.warnRemovedOption(options, "partialRefetch", "client.watchQuery");
2681
2654
  }
2682
2655
  return this.queryManager.watchQuery(options);
2683
2656
  };
@@ -2690,8 +2663,8 @@ var ApolloClient = (function () {
2690
2663
  options = tslib.__assign(tslib.__assign({}, options), { fetchPolicy: "cache-first" });
2691
2664
  }
2692
2665
  if (globalThis.__DEV__ !== false) {
2693
- warnRemovedOption(options, "canonizeResults", "client.query");
2694
- 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.");
2695
2668
  if (options.fetchPolicy === "standby") {
2696
2669
  globalThis.__DEV__ !== false && globals.invariant.warn(19);
2697
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";
603
+ var version = "3.14.1";
608
604
 
609
605
  function maybe(thunk) {
610
606
  try {