@apollo/client 3.6.8 → 3.6.9
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/README.md +1 -0
- package/apollo-client.cjs +15 -10
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +5 -2
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +10 -7
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +15 -10
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +15 -10
- package/invariantErrorCodes.js +1 -1
- package/package.json +11 -11
- package/utilities/observables/Concast.d.ts +1 -0
- package/utilities/observables/Concast.d.ts.map +1 -1
- package/utilities/observables/Concast.js.map +1 -1
- package/version.js +1 -1
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ Learn how to use Apollo Client with self-paced hands-on training on Odyssey, Apo
|
|
|
22
22
|
## Apollo Maintainers
|
|
23
23
|
|
|
24
24
|
- [@benjamn](https://github.com/benjamn)
|
|
25
|
+
- [@alessbell](https://github.com/alessbell)
|
|
25
26
|
- [@hwillson](https://github.com/hwillson)
|
|
26
27
|
- [@jpvajda](https://github.com/jpvajda)
|
|
27
28
|
|
package/apollo-client.cjs
CHANGED
|
@@ -1300,7 +1300,7 @@ var concat = ApolloLink.concat;
|
|
|
1300
1300
|
|
|
1301
1301
|
var execute = ApolloLink.execute;
|
|
1302
1302
|
|
|
1303
|
-
var version = '3.6.
|
|
1303
|
+
var version = '3.6.9';
|
|
1304
1304
|
|
|
1305
1305
|
var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
|
|
1306
1306
|
function parseAndCheckHttpResponse(operations) {
|
|
@@ -4223,7 +4223,8 @@ var ObservableQuery = (function (_super) {
|
|
|
4223
4223
|
ObservableQuery.prototype.applyNextFetchPolicy = function (reason, options) {
|
|
4224
4224
|
if (options.nextFetchPolicy) {
|
|
4225
4225
|
var _a = options.fetchPolicy, fetchPolicy = _a === void 0 ? "cache-first" : _a, _b = options.initialFetchPolicy, initialFetchPolicy = _b === void 0 ? fetchPolicy : _b;
|
|
4226
|
-
if (
|
|
4226
|
+
if (fetchPolicy === "standby") ;
|
|
4227
|
+
else if (typeof options.nextFetchPolicy === "function") {
|
|
4227
4228
|
options.fetchPolicy = options.nextFetchPolicy(fetchPolicy, {
|
|
4228
4229
|
reason: reason,
|
|
4229
4230
|
options: options,
|
|
@@ -4312,7 +4313,8 @@ var ObservableQuery = (function (_super) {
|
|
|
4312
4313
|
if (newOptions &&
|
|
4313
4314
|
newOptions.variables &&
|
|
4314
4315
|
!equality.equal(newOptions.variables, oldVariables) &&
|
|
4315
|
-
|
|
4316
|
+
options.fetchPolicy !== "standby" &&
|
|
4317
|
+
options.fetchPolicy === oldFetchPolicy) {
|
|
4316
4318
|
this.applyNextFetchPolicy("variables-changed", options);
|
|
4317
4319
|
if (newNetworkStatus === void 0) {
|
|
4318
4320
|
newNetworkStatus = exports.NetworkStatus.setVariables;
|
|
@@ -5561,20 +5563,23 @@ var QueryManager = (function () {
|
|
|
5561
5563
|
});
|
|
5562
5564
|
var fromVariables = function (variables) {
|
|
5563
5565
|
normalized.variables = variables;
|
|
5564
|
-
|
|
5566
|
+
var concastSources = _this.fetchQueryByPolicy(queryInfo, normalized, networkStatus);
|
|
5567
|
+
if (normalized.fetchPolicy !== "standby" &&
|
|
5568
|
+
concastSources.length > 0 &&
|
|
5569
|
+
queryInfo.observableQuery) {
|
|
5570
|
+
queryInfo.observableQuery["applyNextFetchPolicy"]("after-fetch", options);
|
|
5571
|
+
}
|
|
5572
|
+
return concastSources;
|
|
5565
5573
|
};
|
|
5574
|
+
var cleanupCancelFn = function () { return _this.fetchCancelFns.delete(queryId); };
|
|
5566
5575
|
this.fetchCancelFns.set(queryId, function (reason) {
|
|
5576
|
+
cleanupCancelFn();
|
|
5567
5577
|
setTimeout(function () { return concast.cancel(reason); });
|
|
5568
5578
|
});
|
|
5569
5579
|
var concast = new Concast(this.transform(normalized.query).hasClientExports
|
|
5570
5580
|
? this.localState.addExportedVariables(normalized.query, normalized.variables, normalized.context).then(fromVariables)
|
|
5571
5581
|
: fromVariables(normalized.variables));
|
|
5572
|
-
concast.
|
|
5573
|
-
_this.fetchCancelFns.delete(queryId);
|
|
5574
|
-
if (queryInfo.observableQuery) {
|
|
5575
|
-
queryInfo.observableQuery["applyNextFetchPolicy"]("after-fetch", options);
|
|
5576
|
-
}
|
|
5577
|
-
});
|
|
5582
|
+
concast.promise.then(cleanupCancelFn, cleanupCancelFn);
|
|
5578
5583
|
return concast;
|
|
5579
5584
|
};
|
|
5580
5585
|
QueryManager.prototype.refetchQueries = function (_a) {
|