@apollo/client 3.3.17 → 3.3.21
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 +22 -12
- 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/context.cjs.js +4 -0
- package/link/context/context.cjs.js.map +1 -1
- package/link/context/index.d.ts.map +1 -1
- package/link/context/index.js +4 -0
- package/link/context/index.js.map +1 -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/http.cjs.js +11 -1
- package/link/http/http.cjs.js.map +1 -1
- package/link/http/package.json +2 -1
- package/link/http/selectHttpOptionsAndBody.js +11 -1
- package/link/http/selectHttpOptionsAndBody.js.map +1 -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 +24 -26
- 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/package.json +2 -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/utilities/policies/pagination.d.ts.map +1 -1
- package/utilities/policies/pagination.js +6 -6
- package/utilities/policies/pagination.js.map +1 -1
- package/utilities/utilities.cjs.js +6 -6
- package/utilities/utilities.cjs.js.map +1 -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.21';
|
|
1238
1239
|
|
|
1239
1240
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
1240
1241
|
function parseAndCheckHttpResponse(operations) {
|
|
@@ -1305,7 +1306,7 @@ var selectHttpOptionsAndBody = function (operation, fallbackConfig) {
|
|
|
1305
1306
|
var options = tslib.__assign(tslib.__assign({}, fallbackConfig.options), { headers: fallbackConfig.headers, credentials: fallbackConfig.credentials });
|
|
1306
1307
|
var http = fallbackConfig.http || {};
|
|
1307
1308
|
configs.forEach(function (config) {
|
|
1308
|
-
options = tslib.__assign(tslib.__assign(tslib.__assign({}, options), config.options), { headers: tslib.__assign(tslib.__assign({}, options.headers), config.headers) });
|
|
1309
|
+
options = tslib.__assign(tslib.__assign(tslib.__assign({}, options), config.options), { headers: tslib.__assign(tslib.__assign({}, options.headers), headersToLowerCase(config.headers)) });
|
|
1309
1310
|
if (config.credentials)
|
|
1310
1311
|
options.credentials = config.credentials;
|
|
1311
1312
|
http = tslib.__assign(tslib.__assign({}, http), config.http);
|
|
@@ -1321,6 +1322,16 @@ var selectHttpOptionsAndBody = function (operation, fallbackConfig) {
|
|
|
1321
1322
|
body: body,
|
|
1322
1323
|
};
|
|
1323
1324
|
};
|
|
1325
|
+
function headersToLowerCase(headers) {
|
|
1326
|
+
if (headers) {
|
|
1327
|
+
var normalized_1 = Object.create(null);
|
|
1328
|
+
Object.keys(Object(headers)).forEach(function (name) {
|
|
1329
|
+
normalized_1[name.toLowerCase()] = headers[name];
|
|
1330
|
+
});
|
|
1331
|
+
return normalized_1;
|
|
1332
|
+
}
|
|
1333
|
+
return headers;
|
|
1334
|
+
}
|
|
1324
1335
|
|
|
1325
1336
|
var checkFetcher = function (fetcher) {
|
|
1326
1337
|
if (!fetcher && typeof fetch === 'undefined') {
|
|
@@ -3220,7 +3231,9 @@ var Policies = (function () {
|
|
|
3220
3231
|
}
|
|
3221
3232
|
var inbox = this.toBeAdded[typename];
|
|
3222
3233
|
if (inbox && inbox.length) {
|
|
3223
|
-
|
|
3234
|
+
inbox.splice(0).forEach(function (policy) {
|
|
3235
|
+
_this.updateTypePolicy(typename, policy);
|
|
3236
|
+
});
|
|
3224
3237
|
}
|
|
3225
3238
|
return this.typePolicies[typename];
|
|
3226
3239
|
};
|
|
@@ -5149,9 +5162,6 @@ var ApolloClient = (function () {
|
|
|
5149
5162
|
return ApolloClient;
|
|
5150
5163
|
}());
|
|
5151
5164
|
|
|
5152
|
-
tsInvariant.setVerbosity("log");
|
|
5153
|
-
var resetCaches = gql.resetCaches, disableFragmentWarnings = gql.disableFragmentWarnings, enableExperimentalFragmentVariables = gql.enableExperimentalFragmentVariables, disableExperimentalFragmentVariables = gql.disableExperimentalFragmentVariables;
|
|
5154
|
-
|
|
5155
5165
|
var cache = new (canUseWeakMap ? WeakMap : Map)();
|
|
5156
5166
|
function getApolloContext() {
|
|
5157
5167
|
var context = cache.get(React__default.createContext);
|
|
@@ -5958,7 +5968,11 @@ function useReactiveVar(rv) {
|
|
|
5958
5968
|
|
|
5959
5969
|
exports.setLogVerbosity = tsInvariant.setVerbosity;
|
|
5960
5970
|
exports.Observable = Observable;
|
|
5961
|
-
exports.
|
|
5971
|
+
exports.disableExperimentalFragmentVariables = graphqlTag.disableExperimentalFragmentVariables;
|
|
5972
|
+
exports.disableFragmentWarnings = graphqlTag.disableFragmentWarnings;
|
|
5973
|
+
exports.enableExperimentalFragmentVariables = graphqlTag.enableExperimentalFragmentVariables;
|
|
5974
|
+
exports.gql = graphqlTag__default;
|
|
5975
|
+
exports.resetCaches = graphqlTag.resetCaches;
|
|
5962
5976
|
exports.ApolloCache = ApolloCache;
|
|
5963
5977
|
exports.ApolloClient = ApolloClient;
|
|
5964
5978
|
exports.ApolloConsumer = ApolloConsumer;
|
|
@@ -5974,10 +5988,7 @@ exports.concat = concat;
|
|
|
5974
5988
|
exports.createHttpLink = createHttpLink;
|
|
5975
5989
|
exports.createSignalIfSupported = createSignalIfSupported;
|
|
5976
5990
|
exports.defaultDataIdFromObject = defaultDataIdFromObject;
|
|
5977
|
-
exports.disableExperimentalFragmentVariables = disableExperimentalFragmentVariables;
|
|
5978
|
-
exports.disableFragmentWarnings = disableFragmentWarnings;
|
|
5979
5991
|
exports.empty = empty;
|
|
5980
|
-
exports.enableExperimentalFragmentVariables = enableExperimentalFragmentVariables;
|
|
5981
5992
|
exports.execute = execute;
|
|
5982
5993
|
exports.fallbackHttpConfig = fallbackHttpConfig;
|
|
5983
5994
|
exports.from = from;
|
|
@@ -5993,7 +6004,6 @@ exports.operationName = operationName;
|
|
|
5993
6004
|
exports.parseAndCheckHttpResponse = parseAndCheckHttpResponse;
|
|
5994
6005
|
exports.parser = parser;
|
|
5995
6006
|
exports.resetApolloContext = getApolloContext;
|
|
5996
|
-
exports.resetCaches = resetCaches;
|
|
5997
6007
|
exports.rewriteURIForGET = rewriteURIForGET;
|
|
5998
6008
|
exports.selectHttpOptionsAndBody = selectHttpOptionsAndBody;
|
|
5999
6009
|
exports.selectURI = selectURI;
|