@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.
- package/CHANGELOG.md +44 -0
- package/apollo-client.cjs +85 -77
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +14 -41
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +14 -41
- package/cache/core/cache.js +1 -1
- package/cache/core/cache.js.map +1 -1
- package/cache/inmemory/inMemoryCache.js +1 -1
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/core/ApolloClient.js +1 -1
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.d.ts +1 -0
- package/core/ObservableQuery.js +10 -6
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.js +1 -1
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.js +1 -1
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +38 -61
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +38 -61
- package/dev/dev.cjs +49 -53
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +49 -53
- package/invariantErrorCodes.js +48 -53
- package/link/core/ApolloLink.js +1 -1
- package/link/core/ApolloLink.js.map +1 -1
- package/link/core/core.cjs +1 -15
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +1 -15
- package/package.json +1 -1
- package/react/components/components.cjs +2 -14
- package/react/components/components.cjs.map +1 -1
- package/react/components/components.cjs.native.js +2 -14
- package/react/hoc/graphql.js +1 -1
- package/react/hoc/graphql.js.map +1 -1
- package/react/hoc/hoc.cjs +12 -31
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +12 -31
- package/react/hoc/mutation-hoc.js +1 -1
- package/react/hoc/mutation-hoc.js.map +1 -1
- package/react/hoc/query-hoc.js +1 -1
- package/react/hoc/query-hoc.js.map +1 -1
- package/react/hoc/subscription-hoc.js +1 -1
- package/react/hoc/subscription-hoc.js.map +1 -1
- package/react/hooks/hooks.cjs +26 -52
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +26 -52
- package/react/hooks/internal/useWarnRemoved.d.ts +1 -1
- package/react/hooks/internal/useWarnRemoved.js +1 -1
- package/react/hooks/internal/useWarnRemoved.js.map +1 -1
- package/react/hooks/internal/useWarnRemovedOption.d.ts +2 -1
- package/react/hooks/internal/useWarnRemovedOption.js +7 -5
- package/react/hooks/internal/useWarnRemovedOption.js.map +1 -1
- package/react/hooks/useApolloClient.js +1 -1
- package/react/hooks/useBackgroundQuery.js +1 -1
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.js +1 -1
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.js +3 -3
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useLoadableQuery.js +3 -3
- package/react/hooks/useLoadableQuery.js.map +1 -1
- package/react/hooks/useQuery.js +3 -3
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useSubscription.js +3 -3
- package/react/hooks/useSuspenseQuery.js +3 -3
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/internal/cache/QueryReference.js +2 -2
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/internal.cjs +3 -14
- package/react/internal/internal.cjs.map +1 -1
- package/react/internal/internal.cjs.native.js +3 -14
- package/react/parser/index.js +7 -7
- package/react/parser/index.js.map +1 -1
- package/react/parser/parser.cjs +9 -29
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +9 -29
- package/react/query-preloader/createQueryPreloader.js +1 -1
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/react.cjs +4 -31
- package/react/react.cjs.map +1 -1
- package/react/react.cjs.native.js +4 -31
- package/testing/core/core.cjs +4 -4
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +4 -4
- package/testing/core/mocking/mockLink.d.ts +13 -0
- package/testing/core/mocking/mockLink.js +4 -4
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/internal/disposables/index.d.ts +1 -0
- package/testing/internal/disposables/index.js +1 -0
- package/testing/internal/disposables/index.js.map +1 -1
- package/testing/internal/disposables/withMutedDeprecations.d.ts +4 -0
- package/testing/internal/disposables/withMutedDeprecations.js +13 -0
- package/testing/internal/disposables/withMutedDeprecations.js.map +1 -0
- package/testing/react/MockedProvider.js +1 -1
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs +5 -32
- package/testing/testing.cjs.map +1 -1
- package/testing/testing.cjs.native.js +5 -32
- package/utilities/deprecation/index.d.ts +0 -3
- package/utilities/deprecation/index.js +4 -12
- package/utilities/deprecation/index.js.map +1 -1
- package/utilities/globals/globals.cjs +1 -1
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +1 -1
- package/utilities/graphql/DocumentTransform.js +1 -1
- package/utilities/graphql/directives.js +7 -7
- package/utilities/graphql/fragments.js +3 -3
- package/utilities/graphql/getFromAST.js +8 -8
- package/utilities/graphql/storeUtils.js +1 -1
- package/utilities/graphql/transform.js +2 -2
- package/utilities/index.d.ts +2 -0
- package/utilities/index.js +1 -0
- package/utilities/index.js.map +1 -1
- package/utilities/utilities.cjs +54 -22
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +54 -22
- package/version.js +1 -1
- package/.changeset/breezy-lions-rule.md +0 -5
- package/.changeset/chilled-cameras-scream.md +0 -5
- package/.changeset/great-jobs-fetch.md +0 -5
- package/.changeset/great-suns-cover.md +0 -5
- package/.changeset/perfect-donuts-roll.md +0 -5
- package/.changeset/popular-waves-drop.md +0 -5
- package/.changeset/pre.json +0 -20
- package/.changeset/shy-boxes-exercise.md +0 -5
- package/.changeset/shy-dragons-tease.md +0 -5
- package/.changeset/smooth-countries-cough.md +0 -5
- package/.changeset/spotty-walls-repair.md +0 -5
- package/.changeset/tidy-bulldogs-exercise.md +0 -5
package/core/core.cjs
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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.
|
|
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
|
}
|