@apollo/client 3.3.16 → 3.3.20
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 +4 -1
- package/apollo-client.cjs.js +21 -14
- package/apollo-client.cjs.js.map +1 -1
- package/apollo-client.cjs.min.js +1 -1
- package/cache/cache.cjs.js +3 -1
- package/cache/cache.cjs.js.map +1 -1
- package/cache/inmemory/policies.d.ts.map +1 -1
- package/cache/inmemory/policies.js +4 -2
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/package.json +2 -1
- package/core/core.cjs.js +8 -8
- package/core/core.cjs.js.map +1 -1
- package/core/index.d.ts +1 -3
- package/core/index.d.ts.map +1 -1
- package/core/index.js +1 -3
- package/core/index.js.map +1 -1
- package/core/package.json +2 -1
- package/errors/package.json +2 -1
- package/invariantErrorCodes.js +1 -1
- package/link/batch/package.json +2 -1
- package/link/batch-http/package.json +2 -1
- package/link/context/package.json +2 -1
- package/link/core/package.json +2 -1
- package/link/error/package.json +2 -1
- package/link/http/package.json +2 -1
- package/link/persisted-queries/package.json +2 -1
- package/link/retry/package.json +2 -1
- package/link/schema/package.json +2 -1
- package/link/utils/package.json +2 -1
- package/link/ws/package.json +2 -1
- package/package.json +23 -25
- package/react/components/package.json +2 -1
- package/react/context/package.json +2 -1
- package/react/data/package.json +2 -1
- package/react/hoc/package.json +2 -1
- package/react/hooks/hooks.cjs.js +10 -3
- package/react/hooks/hooks.cjs.js.map +1 -1
- package/react/hooks/package.json +2 -1
- package/react/hooks/useReactiveVar.d.ts.map +1 -1
- package/react/hooks/useReactiveVar.js +11 -4
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/package.json +2 -1
- package/react/parser/package.json +2 -1
- package/react/ssr/package.json +2 -1
- package/testing/package.json +2 -1
- package/utilities/package.json +2 -1
- package/version.js +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://badge.fury.io/js/%40apollo%2Fclient)
|
|
6
6
|
[](https://circleci.com/gh/apollographql/apollo-client)
|
|
7
|
-
[](https://community.apollographql.com)
|
|
8
8
|
|
|
9
9
|
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.
|
|
10
10
|
|
|
@@ -16,6 +16,9 @@ All Apollo Client documentation, including React integration articles and helpfu
|
|
|
16
16
|
The Apollo Client API reference can be found at: <br/>
|
|
17
17
|
[https://www.apollographql.com/docs/react/api/apollo-client/](https://www.apollographql.com/docs/react/api/apollo-client/)
|
|
18
18
|
|
|
19
|
+
Learn how to use Apollo Client with self-paced hands-on training on Odyssey, Apollo's official learning platform: <br/>
|
|
20
|
+
[https://odyssey.apollographql.com/](https://odyssey.apollographql.com/)
|
|
21
|
+
|
|
19
22
|
## Maintainers
|
|
20
23
|
|
|
21
24
|
- [@benjamn](https://github.com/benjamn) (Apollo)
|
package/apollo-client.cjs.js
CHANGED
|
@@ -13,7 +13,8 @@ require('symbol-observable');
|
|
|
13
13
|
var equality = require('@wry/equality');
|
|
14
14
|
var optimism = require('optimism');
|
|
15
15
|
var context = require('@wry/context');
|
|
16
|
-
var
|
|
16
|
+
var graphqlTag = require('graphql-tag');
|
|
17
|
+
var graphqlTag__default = _interopDefault(graphqlTag);
|
|
17
18
|
var React = require('react');
|
|
18
19
|
var React__default = _interopDefault(React);
|
|
19
20
|
|
|
@@ -1234,7 +1235,7 @@ var concat = ApolloLink.concat;
|
|
|
1234
1235
|
|
|
1235
1236
|
var execute = ApolloLink.execute;
|
|
1236
1237
|
|
|
1237
|
-
var version = '3.3.
|
|
1238
|
+
var version = '3.3.20';
|
|
1238
1239
|
|
|
1239
1240
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
1240
1241
|
function parseAndCheckHttpResponse(operations) {
|
|
@@ -3220,7 +3221,9 @@ var Policies = (function () {
|
|
|
3220
3221
|
}
|
|
3221
3222
|
var inbox = this.toBeAdded[typename];
|
|
3222
3223
|
if (inbox && inbox.length) {
|
|
3223
|
-
|
|
3224
|
+
inbox.splice(0).forEach(function (policy) {
|
|
3225
|
+
_this.updateTypePolicy(typename, policy);
|
|
3226
|
+
});
|
|
3224
3227
|
}
|
|
3225
3228
|
return this.typePolicies[typename];
|
|
3226
3229
|
};
|
|
@@ -5149,9 +5152,6 @@ var ApolloClient = (function () {
|
|
|
5149
5152
|
return ApolloClient;
|
|
5150
5153
|
}());
|
|
5151
5154
|
|
|
5152
|
-
tsInvariant.setVerbosity("log");
|
|
5153
|
-
var resetCaches = gql.resetCaches, disableFragmentWarnings = gql.disableFragmentWarnings, enableExperimentalFragmentVariables = gql.enableExperimentalFragmentVariables, disableExperimentalFragmentVariables = gql.disableExperimentalFragmentVariables;
|
|
5154
|
-
|
|
5155
5155
|
var cache = new (canUseWeakMap ? WeakMap : Map)();
|
|
5156
5156
|
function getApolloContext() {
|
|
5157
5157
|
var context = cache.get(React__default.createContext);
|
|
@@ -5943,15 +5943,26 @@ function useSubscription(subscription, options) {
|
|
|
5943
5943
|
|
|
5944
5944
|
function useReactiveVar(rv) {
|
|
5945
5945
|
var value = rv();
|
|
5946
|
-
var
|
|
5947
|
-
React.
|
|
5948
|
-
|
|
5946
|
+
var setValue = React.useState(value)[1];
|
|
5947
|
+
React.useEffect(function () {
|
|
5948
|
+
var probablySameValue = rv();
|
|
5949
|
+
if (value !== probablySameValue) {
|
|
5950
|
+
setValue(probablySameValue);
|
|
5951
|
+
}
|
|
5952
|
+
else {
|
|
5953
|
+
return rv.onNextChange(setValue);
|
|
5954
|
+
}
|
|
5955
|
+
}, [value]);
|
|
5949
5956
|
return value;
|
|
5950
5957
|
}
|
|
5951
5958
|
|
|
5952
5959
|
exports.setLogVerbosity = tsInvariant.setVerbosity;
|
|
5953
5960
|
exports.Observable = Observable;
|
|
5954
|
-
exports.
|
|
5961
|
+
exports.disableExperimentalFragmentVariables = graphqlTag.disableExperimentalFragmentVariables;
|
|
5962
|
+
exports.disableFragmentWarnings = graphqlTag.disableFragmentWarnings;
|
|
5963
|
+
exports.enableExperimentalFragmentVariables = graphqlTag.enableExperimentalFragmentVariables;
|
|
5964
|
+
exports.gql = graphqlTag__default;
|
|
5965
|
+
exports.resetCaches = graphqlTag.resetCaches;
|
|
5955
5966
|
exports.ApolloCache = ApolloCache;
|
|
5956
5967
|
exports.ApolloClient = ApolloClient;
|
|
5957
5968
|
exports.ApolloConsumer = ApolloConsumer;
|
|
@@ -5967,10 +5978,7 @@ exports.concat = concat;
|
|
|
5967
5978
|
exports.createHttpLink = createHttpLink;
|
|
5968
5979
|
exports.createSignalIfSupported = createSignalIfSupported;
|
|
5969
5980
|
exports.defaultDataIdFromObject = defaultDataIdFromObject;
|
|
5970
|
-
exports.disableExperimentalFragmentVariables = disableExperimentalFragmentVariables;
|
|
5971
|
-
exports.disableFragmentWarnings = disableFragmentWarnings;
|
|
5972
5981
|
exports.empty = empty;
|
|
5973
|
-
exports.enableExperimentalFragmentVariables = enableExperimentalFragmentVariables;
|
|
5974
5982
|
exports.execute = execute;
|
|
5975
5983
|
exports.fallbackHttpConfig = fallbackHttpConfig;
|
|
5976
5984
|
exports.from = from;
|
|
@@ -5986,7 +5994,6 @@ exports.operationName = operationName;
|
|
|
5986
5994
|
exports.parseAndCheckHttpResponse = parseAndCheckHttpResponse;
|
|
5987
5995
|
exports.parser = parser;
|
|
5988
5996
|
exports.resetApolloContext = getApolloContext;
|
|
5989
|
-
exports.resetCaches = resetCaches;
|
|
5990
5997
|
exports.rewriteURIForGET = rewriteURIForGET;
|
|
5991
5998
|
exports.selectHttpOptionsAndBody = selectHttpOptionsAndBody;
|
|
5992
5999
|
exports.selectURI = selectURI;
|