@apollo/client 3.4.11 → 3.4.12
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/apollo-client.cjs.js +15 -6
- package/apollo-client.cjs.js.map +1 -1
- package/apollo-client.cjs.min.js +1 -0
- package/core/core.cjs.js +1 -1
- package/core/core.cjs.js.map +1 -1
- package/invariantErrorCodes.js +1 -1
- package/package.json +5 -5
- package/react/context/ApolloContext.d.ts +2 -1
- package/react/context/ApolloContext.d.ts.map +1 -1
- package/react/context/ApolloContext.js +11 -5
- package/react/context/ApolloContext.js.map +1 -1
- package/react/context/context.cjs.js +10 -4
- package/react/context/context.cjs.js.map +1 -1
- package/utilities/common/canUse.d.ts +1 -0
- package/utilities/common/canUse.d.ts.map +1 -1
- package/utilities/common/canUse.js +2 -0
- package/utilities/common/canUse.js.map +1 -1
- package/utilities/observables/subclassing.d.ts.map +1 -1
- package/utilities/observables/subclassing.js +2 -1
- package/utilities/observables/subclassing.js.map +1 -1
- package/utilities/policies/pagination.d.ts +1 -1
- package/utilities/policies/pagination.d.ts.map +1 -1
- package/utilities/policies/pagination.js +7 -2
- package/utilities/policies/pagination.js.map +1 -1
- package/utilities/utilities.cjs.js +12 -3
- package/utilities/utilities.cjs.js.map +1 -1
- package/version.js +1 -1
- package/apollo-core.cjs.js +0 -5782
- package/apollo-core.cjs.js.map +0 -1
- package/apollo-core.cjs.min.js +0 -1
package/apollo-client.cjs.js
CHANGED
|
@@ -7,6 +7,7 @@ var tsInvariant = require('ts-invariant');
|
|
|
7
7
|
var equality = require('@wry/equality');
|
|
8
8
|
var zenObservableTs = require('zen-observable-ts');
|
|
9
9
|
require('symbol-observable');
|
|
10
|
+
var __ = require('..');
|
|
10
11
|
var graphql = require('graphql');
|
|
11
12
|
var optimism = require('optimism');
|
|
12
13
|
var context = require('@wry/context');
|
|
@@ -886,7 +887,7 @@ function fixObservableSubclass(subclass) {
|
|
|
886
887
|
function set(key) {
|
|
887
888
|
Object.defineProperty(subclass, key, { value: zenObservableTs.Observable });
|
|
888
889
|
}
|
|
889
|
-
if (
|
|
890
|
+
if (__.canUseSymbol && Symbol.species) {
|
|
890
891
|
set(Symbol.species);
|
|
891
892
|
}
|
|
892
893
|
set("@@species");
|
|
@@ -1035,6 +1036,8 @@ function graphQLResultHasError(result) {
|
|
|
1035
1036
|
var canUseWeakMap = typeof WeakMap === 'function' && !(typeof navigator === 'object' &&
|
|
1036
1037
|
navigator.product === 'ReactNative');
|
|
1037
1038
|
var canUseWeakSet = typeof WeakSet === 'function';
|
|
1039
|
+
var canUseSymbol = typeof Symbol === 'function' &&
|
|
1040
|
+
typeof Symbol.for === 'function';
|
|
1038
1041
|
|
|
1039
1042
|
function compact() {
|
|
1040
1043
|
var objects = [];
|
|
@@ -1273,7 +1276,7 @@ var concat = ApolloLink.concat;
|
|
|
1273
1276
|
|
|
1274
1277
|
var execute = ApolloLink.execute;
|
|
1275
1278
|
|
|
1276
|
-
var version = '3.4.
|
|
1279
|
+
var version = '3.4.12';
|
|
1277
1280
|
|
|
1278
1281
|
var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
1279
1282
|
function parseAndCheckHttpResponse(operations) {
|
|
@@ -5716,13 +5719,19 @@ var ApolloClient = (function () {
|
|
|
5716
5719
|
return ApolloClient;
|
|
5717
5720
|
}());
|
|
5718
5721
|
|
|
5719
|
-
var
|
|
5722
|
+
var contextKey = canUseSymbol
|
|
5723
|
+
? Symbol.for('__APOLLO_CONTEXT__')
|
|
5724
|
+
: '__APOLLO_CONTEXT__';
|
|
5720
5725
|
function getApolloContext() {
|
|
5721
|
-
var context =
|
|
5726
|
+
var context = React__namespace.createContext[contextKey];
|
|
5722
5727
|
if (!context) {
|
|
5723
|
-
|
|
5728
|
+
Object.defineProperty(React__namespace.createContext, contextKey, {
|
|
5729
|
+
value: context = React__namespace.createContext({}),
|
|
5730
|
+
enumerable: false,
|
|
5731
|
+
writable: false,
|
|
5732
|
+
configurable: true,
|
|
5733
|
+
});
|
|
5724
5734
|
context.displayName = 'ApolloContext';
|
|
5725
|
-
cache$1.set(React__namespace.createContext, context);
|
|
5726
5735
|
}
|
|
5727
5736
|
return context;
|
|
5728
5737
|
}
|