@apollo/client 3.7.6 → 3.7.7
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 +7 -5
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/LocalState.d.ts.map +1 -1
- package/core/LocalState.js +3 -0
- package/core/LocalState.js.map +1 -1
- package/core/core.cjs +4 -1
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +4 -1
- package/invariantErrorCodes.js +1 -1
- package/package.json +1 -1
- package/react/hooks/hooks.cjs +3 -4
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +3 -4
- package/react/hooks/useLazyQuery.d.ts.map +1 -1
- package/react/hooks/useLazyQuery.js +3 -4
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/testing/core/core.cjs +12 -2
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +12 -2
- package/testing/core/index.d.ts +1 -1
- package/testing/core/index.d.ts.map +1 -1
- package/testing/core/index.js.map +1 -1
- package/testing/core/mocking/mockLink.d.ts +5 -1
- package/testing/core/mocking/mockLink.d.ts.map +1 -1
- package/testing/core/mocking/mockLink.js +12 -2
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/mocking/mockQueryManager.d.ts +1 -1
- package/testing/core/mocking/mockQueryManager.d.ts.map +1 -1
- package/testing/core/mocking/mockQueryManager.js +3 -3
- package/testing/core/mocking/mockQueryManager.js.map +1 -1
- package/testing/core/mocking/mockWatchQuery.d.ts +1 -1
- package/testing/core/mocking/mockWatchQuery.d.ts.map +1 -1
- package/testing/core/mocking/mockWatchQuery.js +4 -5
- package/testing/core/mocking/mockWatchQuery.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +1 -0
- package/testing/react/MockedProvider.d.ts.map +1 -1
- package/testing/react/MockedProvider.js +2 -2
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs +2 -2
- package/testing/testing.cjs.map +1 -1
- package/testing/testing.cjs.native.js +2 -2
- package/utilities/common/mergeOptions.d.ts +1 -1
- package/utilities/common/mergeOptions.d.ts.map +1 -1
- package/utilities/common/mergeOptions.js.map +1 -1
- package/version.js +1 -1
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ Learn how to use Apollo Client with self-paced hands-on training on Odyssey, Apo
|
|
|
29
29
|
|Jeff Auriemma|[@bignimbus](https://github.com/bignimbus)|
|
|
30
30
|
|Hugh Willson|[@hwillson](https://github.com/hwillson)|
|
|
31
31
|
|Jerel Miller|[@jerelmiller](https://github.com/jerelmiller)|
|
|
32
|
+
|Lenz Weber-Tronic|[@phryneas](https://github.com/phryneas)|
|
|
32
33
|
|
|
33
34
|
## Who is Apollo?
|
|
34
35
|
|
package/apollo-client.cjs
CHANGED
|
@@ -1345,7 +1345,7 @@ var concat = ApolloLink.concat;
|
|
|
1345
1345
|
|
|
1346
1346
|
var execute = ApolloLink.execute;
|
|
1347
1347
|
|
|
1348
|
-
var version = '3.7.
|
|
1348
|
+
var version = '3.7.7';
|
|
1349
1349
|
|
|
1350
1350
|
function isNodeResponse(value) {
|
|
1351
1351
|
return !!value.body;
|
|
@@ -4964,6 +4964,9 @@ var LocalState = (function () {
|
|
|
4964
4964
|
var variables, fieldName, aliasedFieldName, aliasUsed, defaultResult, resultPromise, resolverType, resolverMap, resolve;
|
|
4965
4965
|
var _this = this;
|
|
4966
4966
|
return tslib.__generator(this, function (_a) {
|
|
4967
|
+
if (!rootValue) {
|
|
4968
|
+
return [2, null];
|
|
4969
|
+
}
|
|
4967
4970
|
variables = execContext.variables;
|
|
4968
4971
|
fieldName = field.name.value;
|
|
4969
4972
|
aliasedFieldName = resultKeyNameFromField(field);
|
|
@@ -6939,12 +6942,11 @@ var EAGER_METHODS = [
|
|
|
6939
6942
|
'subscribeToMore',
|
|
6940
6943
|
];
|
|
6941
6944
|
function useLazyQuery(query, options) {
|
|
6945
|
+
var _a;
|
|
6942
6946
|
var abortControllersRef = React.useRef(new Set());
|
|
6943
|
-
var internalState = useInternalState(useApolloClient(options && options.client), query);
|
|
6944
6947
|
var execOptionsRef = React.useRef();
|
|
6945
|
-
var merged = execOptionsRef.current
|
|
6946
|
-
|
|
6947
|
-
: options;
|
|
6948
|
+
var merged = execOptionsRef.current ? mergeOptions(options, execOptionsRef.current) : options;
|
|
6949
|
+
var internalState = useInternalState(useApolloClient(options && options.client), (_a = merged === null || merged === void 0 ? void 0 : merged.query) !== null && _a !== void 0 ? _a : query);
|
|
6948
6950
|
var useQueryResult = internalState.useQuery(tslib.__assign(tslib.__assign({}, merged), { skip: !execOptionsRef.current }));
|
|
6949
6951
|
var initialFetchPolicy = useQueryResult.observable.options.initialFetchPolicy ||
|
|
6950
6952
|
internalState.getDefaultFetchPolicy();
|