@apollo/client 3.8.3 → 3.9.0-alpha.0
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 +8 -6
- package/apollo-client.cjs +12 -7
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/config/jest/setup.js +10 -0
- package/config/jest/setup.js.map +1 -1
- package/core/QueryInfo.d.ts +1 -1
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +4 -4
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +1 -1
- package/core/QueryManager.d.ts.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 +7 -2
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +7 -2
- package/package.json +30 -23
- package/testing/core/core.cjs +19 -2
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +19 -2
- package/testing/core/mocking/mockLink.d.ts +5 -2
- package/testing/core/mocking/mockLink.d.ts.map +1 -1
- package/testing/core/mocking/mockLink.js +19 -2
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/withConsoleSpy.d.ts.map +1 -1
- package/testing/core/withConsoleSpy.js.map +1 -1
- package/testing/internal/disposables/index.d.ts +3 -0
- package/testing/internal/disposables/index.d.ts.map +1 -0
- package/testing/internal/disposables/index.js +3 -0
- package/testing/internal/disposables/index.js.map +1 -0
- package/testing/internal/disposables/spyOnConsole.d.ts +10 -0
- package/testing/internal/disposables/spyOnConsole.d.ts.map +1 -0
- package/testing/internal/disposables/spyOnConsole.js +33 -0
- package/testing/internal/disposables/spyOnConsole.js.map +1 -0
- package/testing/internal/disposables/withCleanup.d.ts +3 -0
- package/testing/internal/disposables/withCleanup.d.ts.map +1 -0
- package/testing/internal/disposables/withCleanup.js +11 -0
- package/testing/internal/disposables/withCleanup.js.map +1 -0
- package/testing/internal/index.d.ts +3 -0
- package/testing/internal/index.d.ts.map +1 -0
- package/testing/internal/index.js +3 -0
- package/testing/internal/index.js.map +1 -0
- package/testing/internal/profile/Render.d.ts +140 -0
- package/testing/internal/profile/Render.d.ts.map +1 -0
- package/testing/internal/profile/Render.js +132 -0
- package/testing/internal/profile/Render.js.map +1 -0
- package/testing/internal/profile/index.d.ts +4 -0
- package/testing/internal/profile/index.d.ts.map +1 -0
- package/testing/internal/profile/index.js +2 -0
- package/testing/internal/profile/index.js.map +1 -0
- package/testing/internal/profile/profile.d.ts +55 -0
- package/testing/internal/profile/profile.d.ts.map +1 -0
- package/testing/internal/profile/profile.js +222 -0
- package/testing/internal/profile/profile.js.map +1 -0
- package/testing/internal/profile/traces.d.ts +3 -0
- package/testing/internal/profile/traces.d.ts.map +1 -0
- package/testing/internal/profile/traces.js +26 -0
- package/testing/internal/profile/traces.js.map +1 -0
- package/testing/matchers/ProfiledComponent.d.ts +8 -0
- package/testing/matchers/ProfiledComponent.d.ts.map +1 -0
- package/testing/matchers/ProfiledComponent.js +107 -0
- package/testing/matchers/ProfiledComponent.js.map +1 -0
- package/testing/matchers/index.js +3 -0
- package/testing/matchers/index.js.map +1 -1
- package/utilities/globals/globals.cjs +7 -2
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +7 -2
- package/utilities/globals/invariantWrappers.d.ts.map +1 -1
- package/utilities/globals/invariantWrappers.js +6 -1
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/version.js +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p>
|
|
4
|
+
<a href="https://www.apollographql.com/"><img src="https://raw.githubusercontent.com/apollographql/apollo-client-devtools/main/assets/apollo-wordmark.svg" height="100" alt="Apollo Client"></a>
|
|
5
|
+
</p>
|
|
6
|
+
<h1>Apollo Client</h1>
|
|
4
7
|
|
|
5
|
-
[](https://badge.fury.io/js/%40apollo%2Fclient)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[](https://discord.gg/graphos)
|
|
8
|
+
[](https://badge.fury.io/js/%40apollo%2Fclient) [](https://circleci.com/gh/apollographql/apollo-client) [](https://community.apollographql.com) [](https://discord.gg/graphos)
|
|
9
|
+
|
|
10
|
+
</div>
|
|
9
11
|
|
|
10
12
|
Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components that fetch data via GraphQL.
|
|
11
13
|
|
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.
|
|
34
|
+
var version = "3.9.0-alpha.0";
|
|
35
35
|
|
|
36
36
|
function maybe(thunk) {
|
|
37
37
|
try {
|
|
@@ -70,7 +70,12 @@ function wrap(fn) {
|
|
|
70
70
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
71
71
|
args[_i - 1] = arguments[_i];
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
if (typeof message === "number") {
|
|
74
|
+
fn(getErrorMsg(message, args));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
fn.apply(void 0, tslib.__spreadArray([message], args, false));
|
|
78
|
+
}
|
|
74
79
|
};
|
|
75
80
|
}
|
|
76
81
|
var invariant = Object.assign(function invariant(condition, message) {
|
|
@@ -5703,6 +5708,7 @@ var QueryInfo = (function () {
|
|
|
5703
5708
|
};
|
|
5704
5709
|
QueryInfo.prototype.markResult = function (result, document, options, cacheWriteBehavior) {
|
|
5705
5710
|
var _this = this;
|
|
5711
|
+
result = tslib.__assign({}, result);
|
|
5706
5712
|
var merger = new DeepMerger();
|
|
5707
5713
|
var graphQLErrors = isNonEmptyArray(result.errors)
|
|
5708
5714
|
? result.errors.slice(0)
|
|
@@ -5731,7 +5737,7 @@ var QueryInfo = (function () {
|
|
|
5731
5737
|
overwrite: cacheWriteBehavior === 1,
|
|
5732
5738
|
});
|
|
5733
5739
|
_this.lastWrite = {
|
|
5734
|
-
result: result,
|
|
5740
|
+
result: tslib.__assign({}, result),
|
|
5735
5741
|
variables: options.variables,
|
|
5736
5742
|
dmCount: destructiveMethodCounts.get(_this.cache),
|
|
5737
5743
|
};
|
|
@@ -5748,15 +5754,14 @@ var QueryInfo = (function () {
|
|
|
5748
5754
|
_this.updateWatch(options.variables);
|
|
5749
5755
|
}
|
|
5750
5756
|
_this.updateLastDiff(diff, diffOptions);
|
|
5751
|
-
|
|
5752
|
-
result.data = diff.result;
|
|
5753
|
-
}
|
|
5757
|
+
result.data = diff.result;
|
|
5754
5758
|
});
|
|
5755
5759
|
}
|
|
5756
5760
|
else {
|
|
5757
5761
|
this.lastWrite = void 0;
|
|
5758
5762
|
}
|
|
5759
5763
|
}
|
|
5764
|
+
return result;
|
|
5760
5765
|
};
|
|
5761
5766
|
QueryInfo.prototype.markReady = function () {
|
|
5762
5767
|
this.networkError = null;
|
|
@@ -6427,7 +6432,7 @@ var QueryManager = (function () {
|
|
|
6427
6432
|
graphQLErrors: graphQLErrors,
|
|
6428
6433
|
}));
|
|
6429
6434
|
}
|
|
6430
|
-
queryInfo.markResult(result, linkDocument, options, cacheWriteBehavior);
|
|
6435
|
+
result = queryInfo.markResult(result, linkDocument, options, cacheWriteBehavior);
|
|
6431
6436
|
queryInfo.markReady();
|
|
6432
6437
|
}
|
|
6433
6438
|
var aqr = {
|