@apollo/client 3.9.3 → 3.9.4
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 +8 -0
- package/apollo-client.cjs +7 -7
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/QueryInfo.d.ts +1 -1
- package/core/QueryInfo.js +9 -11
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.js +1 -1
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +6 -6
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +6 -6
- package/dev/dev.cjs +1 -1
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +1 -1
- package/package.json +1 -1
- package/react/hooks/hooks.cjs +1 -1
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +1 -1
- package/react/hooks/useLazyQuery.js +1 -1
- package/react/hooks/useLazyQuery.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/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
+
## 3.9.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#11403](https://github.com/apollographql/apollo-client/pull/11403) [`b0c4f3a`](https://github.com/apollographql/apollo-client/commit/b0c4f3ad8198981a229b46dc430345a76e577e9c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue in `useLazyQuery` that results in a double network call when calling the execute function with no arguments after having called it previously with another set of arguments.
|
|
8
|
+
|
|
9
|
+
- [#11576](https://github.com/apollographql/apollo-client/pull/11576) [`e855d00`](https://github.com/apollographql/apollo-client/commit/e855d00447e4d9ae478d98f6796d842ef6cc76d1) Thanks [@alessbell](https://github.com/alessbell)! - Revert PR [#11202](https://github.com/apollographql/apollo-client/pull/11202) to fix caching bug reported in [#11560](https://github.com/apollographql/apollo-client/issues/11560)
|
|
10
|
+
|
|
3
11
|
## 3.9.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/apollo-client.cjs
CHANGED
|
@@ -31,7 +31,7 @@ function _interopNamespace(e) {
|
|
|
31
31
|
var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
|
|
32
32
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
33
|
|
|
34
|
-
var version = "3.9.
|
|
34
|
+
var version = "3.9.4";
|
|
35
35
|
|
|
36
36
|
function maybe(thunk) {
|
|
37
37
|
try {
|
|
@@ -5908,7 +5908,6 @@ var QueryInfo = (function () {
|
|
|
5908
5908
|
};
|
|
5909
5909
|
QueryInfo.prototype.markResult = function (result, document, options, cacheWriteBehavior) {
|
|
5910
5910
|
var _this = this;
|
|
5911
|
-
result = tslib.__assign({}, result);
|
|
5912
5911
|
var merger = new DeepMerger();
|
|
5913
5912
|
var graphQLErrors = isNonEmptyArray(result.errors) ? result.errors.slice(0) : [];
|
|
5914
5913
|
this.reset();
|
|
@@ -5935,7 +5934,7 @@ var QueryInfo = (function () {
|
|
|
5935
5934
|
overwrite: cacheWriteBehavior === 1 ,
|
|
5936
5935
|
});
|
|
5937
5936
|
_this.lastWrite = {
|
|
5938
|
-
result:
|
|
5937
|
+
result: result,
|
|
5939
5938
|
variables: options.variables,
|
|
5940
5939
|
dmCount: destructiveMethodCounts.get(_this.cache),
|
|
5941
5940
|
};
|
|
@@ -5952,14 +5951,15 @@ var QueryInfo = (function () {
|
|
|
5952
5951
|
_this.updateWatch(options.variables);
|
|
5953
5952
|
}
|
|
5954
5953
|
_this.updateLastDiff(diff, diffOptions);
|
|
5955
|
-
|
|
5954
|
+
if (diff.complete) {
|
|
5955
|
+
result.data = diff.result;
|
|
5956
|
+
}
|
|
5956
5957
|
});
|
|
5957
5958
|
}
|
|
5958
5959
|
else {
|
|
5959
5960
|
this.lastWrite = void 0;
|
|
5960
5961
|
}
|
|
5961
5962
|
}
|
|
5962
|
-
return result;
|
|
5963
5963
|
};
|
|
5964
5964
|
QueryInfo.prototype.markReady = function () {
|
|
5965
5965
|
this.networkError = null;
|
|
@@ -6634,7 +6634,7 @@ var QueryManager = (function () {
|
|
|
6634
6634
|
graphQLErrors: graphQLErrors,
|
|
6635
6635
|
}));
|
|
6636
6636
|
}
|
|
6637
|
-
|
|
6637
|
+
queryInfo.markResult(result, linkDocument, options, cacheWriteBehavior);
|
|
6638
6638
|
queryInfo.markReady();
|
|
6639
6639
|
}
|
|
6640
6640
|
var aqr = {
|
|
@@ -7669,7 +7669,7 @@ function useLazyQuery(query, options) {
|
|
|
7669
7669
|
var queryRef = React__namespace.useRef();
|
|
7670
7670
|
var merged = mergeOptions(options, execOptionsRef.current || {});
|
|
7671
7671
|
var document = (_a = merged === null || merged === void 0 ? void 0 : merged.query) !== null && _a !== void 0 ? _a : query;
|
|
7672
|
-
optionsRef.current =
|
|
7672
|
+
optionsRef.current = options;
|
|
7673
7673
|
queryRef.current = document;
|
|
7674
7674
|
var internalState = useInternalState(useApolloClient(options && options.client), document);
|
|
7675
7675
|
var useQueryResult = internalState.useQuery(tslib.__assign(tslib.__assign({}, merged), { skip: !execOptionsRef.current }));
|