@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.
@@ -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 (typeof Symbol === "function" && Symbol.species) {
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.11';
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 cache$1 = new (canUseWeakMap ? WeakMap : Map)();
5722
+ var contextKey = canUseSymbol
5723
+ ? Symbol.for('__APOLLO_CONTEXT__')
5724
+ : '__APOLLO_CONTEXT__';
5720
5725
  function getApolloContext() {
5721
- var context = cache$1.get(React__namespace.createContext);
5726
+ var context = React__namespace.createContext[contextKey];
5722
5727
  if (!context) {
5723
- context = React__namespace.createContext({});
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
  }