@apollo/client 3.12.2 → 3.12.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 +18 -0
- package/README.md +2 -2
- package/apollo-client.cjs +25 -15
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/QueryManager.js +20 -10
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +21 -11
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +21 -11
- package/dev/dev.cjs +2 -2
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +2 -2
- package/invariantErrorCodes.js +1 -1
- package/masking/__benches__/types.bench.js +55 -1
- package/masking/__benches__/types.bench.js.map +1 -1
- package/masking/internal/types.d.ts +4 -3
- package/masking/internal/types.js.map +1 -1
- package/package.json +11 -10
- package/react/hoc/hoc.cjs +26 -20
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +26 -20
- package/react/hoc/mutation-hoc.js +32 -25
- package/react/hoc/mutation-hoc.js.map +1 -1
- package/react/hooks/hooks.cjs +4 -4
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +4 -4
- package/react/hooks/internal/useDeepMemo.js +1 -1
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/useLazyQuery.js +3 -3
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/internal/internal.cjs +1 -1
- package/react/internal/internal.cjs.map +1 -1
- package/react/internal/internal.cjs.native.js +1 -1
- package/testing/internal/ObservableStream.d.ts +2 -0
- package/testing/internal/ObservableStream.js +5 -1
- package/testing/internal/ObservableStream.js.map +1 -1
- package/testing/internal/rtl/renderHookAsync.js +1 -0
- package/testing/internal/rtl/renderHookAsync.js.map +1 -1
- package/testing/matchers/toEmitError.js +8 -2
- package/testing/matchers/toEmitError.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/index.d.ts +1 -0
- package/utilities/index.js.map +1 -1
- package/utilities/types/RemoveIndexSignature.d.ts +4 -0
- package/utilities/types/RemoveIndexSignature.js +2 -0
- package/utilities/types/RemoveIndexSignature.js.map +1 -0
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
+
## 3.12.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#12236](https://github.com/apollographql/apollo-client/pull/12236) [`4334d30`](https://github.com/apollographql/apollo-client/commit/4334d30cc3fbedb4f736eff196c49a9f20a46704) Thanks [@charpeni](https://github.com/charpeni)! - Fix an issue with `refetchQueries` where comparing `DocumentNode`s internally by references could lead to an unknown query, even though the `DocumentNode` was indeed an active query—with a different reference.
|
|
8
|
+
|
|
9
|
+
## 3.12.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#12214](https://github.com/apollographql/apollo-client/pull/12214) [`8bfee88`](https://github.com/apollographql/apollo-client/commit/8bfee88102dd071ea5836f7267f30ca082671b2b) Thanks [@phryneas](https://github.com/phryneas)! - Data masking: prevent infinite recursion of `ContainsFragmentsRefs` type
|
|
14
|
+
|
|
15
|
+
- [#12204](https://github.com/apollographql/apollo-client/pull/12204) [`851deb0`](https://github.com/apollographql/apollo-client/commit/851deb06f42eb255b4839c2b88430f991943ae0f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix `Unmasked` unwrapping tuple types into an array of their subtypes.
|
|
16
|
+
|
|
17
|
+
- [#12204](https://github.com/apollographql/apollo-client/pull/12204) [`851deb0`](https://github.com/apollographql/apollo-client/commit/851deb06f42eb255b4839c2b88430f991943ae0f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `MaybeMasked` does not try and unwrap types that contain index signatures.
|
|
18
|
+
|
|
19
|
+
- [#12204](https://github.com/apollographql/apollo-client/pull/12204) [`851deb0`](https://github.com/apollographql/apollo-client/commit/851deb06f42eb255b4839c2b88430f991943ae0f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `MaybeMasked` does not try to unwrap the type as `Unmasked` if the type contains `any`.
|
|
20
|
+
|
|
3
21
|
## 3.12.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
</p>
|
|
6
6
|
<h1>Apollo Client</h1>
|
|
7
7
|
|
|
8
|
-
[](https://badge.fury.io/js/%40apollo%2Fclient) [](https://circleci.com/gh/apollographql/apollo-client) [](https://community.apollographql.com)
|
|
8
|
+
[](https://badge.fury.io/js/%40apollo%2Fclient) [](https://circleci.com/gh/apollographql/apollo-client) [](https://community.apollographql.com)
|
|
9
9
|
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
**Announcement:**
|
|
14
|
+
**Announcement:**
|
|
15
15
|
Join 1000+ engineers at GraphQL Summit for talks, workshops, and office hours, Oct 8-10 in NYC. [Get your pass here ->](https://summit.graphql.com/?utm_campaign=github_federation_readme)
|
|
16
16
|
|
|
17
17
|
---
|
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.12.
|
|
34
|
+
var version = "3.12.4";
|
|
35
35
|
|
|
36
36
|
function maybe(thunk) {
|
|
37
37
|
try {
|
|
@@ -6486,15 +6486,19 @@ var QueryManager = (function () {
|
|
|
6486
6486
|
var _this = this;
|
|
6487
6487
|
if (include === void 0) { include = "active"; }
|
|
6488
6488
|
var queries = new Map();
|
|
6489
|
-
var
|
|
6489
|
+
var queryNames = new Map();
|
|
6490
|
+
var queryNamesAndQueryStrings = new Map();
|
|
6490
6491
|
var legacyQueryOptions = new Set();
|
|
6491
6492
|
if (Array.isArray(include)) {
|
|
6492
6493
|
include.forEach(function (desc) {
|
|
6493
6494
|
if (typeof desc === "string") {
|
|
6494
|
-
|
|
6495
|
+
queryNames.set(desc, desc);
|
|
6496
|
+
queryNamesAndQueryStrings.set(desc, false);
|
|
6495
6497
|
}
|
|
6496
6498
|
else if (isDocumentNode(desc)) {
|
|
6497
|
-
|
|
6499
|
+
var queryString = print(_this.transform(desc));
|
|
6500
|
+
queryNames.set(queryString, getOperationName(desc));
|
|
6501
|
+
queryNamesAndQueryStrings.set(queryString, false);
|
|
6498
6502
|
}
|
|
6499
6503
|
else if (isNonNullObject(desc) && desc.query) {
|
|
6500
6504
|
legacyQueryOptions.add(desc);
|
|
@@ -6514,13 +6518,13 @@ var QueryManager = (function () {
|
|
|
6514
6518
|
return;
|
|
6515
6519
|
}
|
|
6516
6520
|
if (include === "active" ||
|
|
6517
|
-
(queryName &&
|
|
6518
|
-
(document &&
|
|
6521
|
+
(queryName && queryNamesAndQueryStrings.has(queryName)) ||
|
|
6522
|
+
(document && queryNamesAndQueryStrings.has(print(document)))) {
|
|
6519
6523
|
queries.set(queryId, oq);
|
|
6520
6524
|
if (queryName)
|
|
6521
|
-
|
|
6525
|
+
queryNamesAndQueryStrings.set(queryName, true);
|
|
6522
6526
|
if (document)
|
|
6523
|
-
|
|
6527
|
+
queryNamesAndQueryStrings.set(print(document), true);
|
|
6524
6528
|
}
|
|
6525
6529
|
}
|
|
6526
6530
|
});
|
|
@@ -6541,10 +6545,16 @@ var QueryManager = (function () {
|
|
|
6541
6545
|
queries.set(queryId, oq);
|
|
6542
6546
|
});
|
|
6543
6547
|
}
|
|
6544
|
-
if (globalThis.__DEV__ !== false &&
|
|
6545
|
-
|
|
6548
|
+
if (globalThis.__DEV__ !== false && queryNamesAndQueryStrings.size) {
|
|
6549
|
+
queryNamesAndQueryStrings.forEach(function (included, nameOrQueryString) {
|
|
6546
6550
|
if (!included) {
|
|
6547
|
-
|
|
6551
|
+
var queryName = queryNames.get(nameOrQueryString);
|
|
6552
|
+
if (queryName) {
|
|
6553
|
+
globalThis.__DEV__ !== false && invariant.warn(35, queryName);
|
|
6554
|
+
}
|
|
6555
|
+
else {
|
|
6556
|
+
globalThis.__DEV__ !== false && invariant.warn(36);
|
|
6557
|
+
}
|
|
6548
6558
|
}
|
|
6549
6559
|
});
|
|
6550
6560
|
}
|
|
@@ -7805,7 +7815,7 @@ function verifyDocumentType(document, type) {
|
|
|
7805
7815
|
}
|
|
7806
7816
|
|
|
7807
7817
|
function useDeepMemo(memoFn, deps) {
|
|
7808
|
-
var ref = React__namespace.useRef();
|
|
7818
|
+
var ref = React__namespace.useRef(void 0);
|
|
7809
7819
|
if (!ref.current || !equal.equal(ref.current.deps, deps)) {
|
|
7810
7820
|
ref.current = { value: memoFn(), deps: deps };
|
|
7811
7821
|
}
|
|
@@ -8167,9 +8177,9 @@ var EAGER_METHODS = [
|
|
|
8167
8177
|
];
|
|
8168
8178
|
function useLazyQuery(query, options) {
|
|
8169
8179
|
var _a;
|
|
8170
|
-
var execOptionsRef = React__namespace.useRef();
|
|
8171
|
-
var optionsRef = React__namespace.useRef();
|
|
8172
|
-
var queryRef = React__namespace.useRef();
|
|
8180
|
+
var execOptionsRef = React__namespace.useRef(void 0);
|
|
8181
|
+
var optionsRef = React__namespace.useRef(void 0);
|
|
8182
|
+
var queryRef = React__namespace.useRef(void 0);
|
|
8173
8183
|
var merged = mergeOptions(options, execOptionsRef.current || {});
|
|
8174
8184
|
var document = (_a = merged === null || merged === void 0 ? void 0 : merged.query) !== null && _a !== void 0 ? _a : query;
|
|
8175
8185
|
optionsRef.current = options;
|