@apollo/client 3.3.0-rc.2 → 3.3.0

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.
Files changed (190) hide show
  1. package/apollo-client.cjs.js +68 -45
  2. package/apollo-client.cjs.js.map +1 -1
  3. package/apollo-client.cjs.min.js +1 -1
  4. package/cache/cache.cjs.js +40 -14
  5. package/cache/cache.cjs.js.map +1 -1
  6. package/cache/core/cache.js.map +1 -1
  7. package/cache/core/types/Cache.js.map +1 -1
  8. package/cache/core/types/DataProxy.js.map +1 -1
  9. package/cache/core/types/common.js.map +1 -1
  10. package/cache/index.js.map +1 -1
  11. package/cache/inmemory/entityStore.d.ts.map +1 -1
  12. package/cache/inmemory/entityStore.js +11 -2
  13. package/cache/inmemory/entityStore.js.map +1 -1
  14. package/cache/inmemory/fixPolyfills.js.map +1 -1
  15. package/cache/inmemory/fixPolyfills.native.js.map +1 -1
  16. package/cache/inmemory/helpers.js.map +1 -1
  17. package/cache/inmemory/inMemoryCache.js.map +1 -1
  18. package/cache/inmemory/policies.d.ts +1 -0
  19. package/cache/inmemory/policies.d.ts.map +1 -1
  20. package/cache/inmemory/policies.js +4 -0
  21. package/cache/inmemory/policies.js.map +1 -1
  22. package/cache/inmemory/reactiveVars.d.ts +1 -0
  23. package/cache/inmemory/reactiveVars.d.ts.map +1 -1
  24. package/cache/inmemory/reactiveVars.js +25 -12
  25. package/cache/inmemory/reactiveVars.js.map +1 -1
  26. package/cache/inmemory/readFromStore.js.map +1 -1
  27. package/cache/inmemory/types.js.map +1 -1
  28. package/cache/inmemory/writeToStore.js.map +1 -1
  29. package/config/jest/setup.js.map +1 -1
  30. package/core/ApolloClient.js.map +1 -1
  31. package/core/LocalState.js.map +1 -1
  32. package/core/ObservableQuery.d.ts.map +1 -1
  33. package/core/ObservableQuery.js +3 -3
  34. package/core/ObservableQuery.js.map +1 -1
  35. package/core/QueryInfo.d.ts.map +1 -1
  36. package/core/QueryInfo.js +9 -4
  37. package/core/QueryInfo.js.map +1 -1
  38. package/core/QueryManager.js.map +1 -1
  39. package/core/Reobserver.js.map +1 -1
  40. package/core/core.cjs.js +12 -7
  41. package/core/core.cjs.js.map +1 -1
  42. package/core/index.js.map +1 -1
  43. package/core/networkStatus.js.map +1 -1
  44. package/core/types.js.map +1 -1
  45. package/core/watchQueryOptions.js.map +1 -1
  46. package/errors/index.js.map +1 -1
  47. package/index.js.map +1 -1
  48. package/invariantErrorCodes.js +1 -1
  49. package/link/batch/batchLink.js.map +1 -1
  50. package/link/batch/batching.js.map +1 -1
  51. package/link/batch/index.js.map +1 -1
  52. package/link/batch-http/batchHttpLink.js.map +1 -1
  53. package/link/batch-http/index.js.map +1 -1
  54. package/link/context/index.js.map +1 -1
  55. package/link/core/ApolloLink.js.map +1 -1
  56. package/link/core/concat.js.map +1 -1
  57. package/link/core/empty.js.map +1 -1
  58. package/link/core/execute.js.map +1 -1
  59. package/link/core/from.js.map +1 -1
  60. package/link/core/index.js.map +1 -1
  61. package/link/core/split.js.map +1 -1
  62. package/link/core/types.js.map +1 -1
  63. package/link/error/index.js.map +1 -1
  64. package/link/http/HttpLink.js.map +1 -1
  65. package/link/http/checkFetcher.js.map +1 -1
  66. package/link/http/createHttpLink.js.map +1 -1
  67. package/link/http/createSignalIfSupported.js.map +1 -1
  68. package/link/http/index.js.map +1 -1
  69. package/link/http/parseAndCheckHttpResponse.js.map +1 -1
  70. package/link/http/rewriteURIForGET.js.map +1 -1
  71. package/link/http/selectHttpOptionsAndBody.js.map +1 -1
  72. package/link/http/selectURI.js.map +1 -1
  73. package/link/http/serializeFetchParameter.js.map +1 -1
  74. package/link/persisted-queries/index.js.map +1 -1
  75. package/link/retry/delayFunction.js.map +1 -1
  76. package/link/retry/index.js.map +1 -1
  77. package/link/retry/retryFunction.js.map +1 -1
  78. package/link/retry/retryLink.js.map +1 -1
  79. package/link/schema/index.d.ts +2 -0
  80. package/link/schema/index.d.ts.map +1 -1
  81. package/link/schema/index.js +6 -3
  82. package/link/schema/index.js.map +1 -1
  83. package/link/schema/schema.cjs.js +6 -3
  84. package/link/schema/schema.cjs.js.map +1 -1
  85. package/link/utils/createOperation.js.map +1 -1
  86. package/link/utils/fromError.js.map +1 -1
  87. package/link/utils/fromPromise.js.map +1 -1
  88. package/link/utils/index.js.map +1 -1
  89. package/link/utils/throwServerError.js.map +1 -1
  90. package/link/utils/toPromise.js.map +1 -1
  91. package/link/utils/transformOperation.js.map +1 -1
  92. package/link/utils/validateOperation.js.map +1 -1
  93. package/link/ws/index.js.map +1 -1
  94. package/package.json +5 -5
  95. package/react/components/Mutation.js.map +1 -1
  96. package/react/components/Query.js.map +1 -1
  97. package/react/components/Subscription.js.map +1 -1
  98. package/react/components/index.js.map +1 -1
  99. package/react/components/types.js.map +1 -1
  100. package/react/context/ApolloConsumer.d.ts +1 -1
  101. package/react/context/ApolloConsumer.d.ts.map +1 -1
  102. package/react/context/ApolloConsumer.js +1 -1
  103. package/react/context/ApolloConsumer.js.map +1 -1
  104. package/react/context/ApolloContext.d.ts +2 -2
  105. package/react/context/ApolloContext.d.ts.map +1 -1
  106. package/react/context/ApolloContext.js +9 -15
  107. package/react/context/ApolloContext.js.map +1 -1
  108. package/react/context/ApolloProvider.d.ts +1 -1
  109. package/react/context/ApolloProvider.d.ts.map +1 -1
  110. package/react/context/ApolloProvider.js +1 -1
  111. package/react/context/ApolloProvider.js.map +1 -1
  112. package/react/context/context.cjs.js +9 -18
  113. package/react/context/context.cjs.js.map +1 -1
  114. package/react/context/index.js.map +1 -1
  115. package/react/data/MutationData.js.map +1 -1
  116. package/react/data/OperationData.js.map +1 -1
  117. package/react/data/QueryData.d.ts.map +1 -1
  118. package/react/data/QueryData.js +2 -1
  119. package/react/data/QueryData.js.map +1 -1
  120. package/react/data/SubscriptionData.js.map +1 -1
  121. package/react/data/data.cjs.js +2 -1
  122. package/react/data/data.cjs.js.map +1 -1
  123. package/react/data/index.js.map +1 -1
  124. package/react/hoc/graphql.js.map +1 -1
  125. package/react/hoc/hoc-utils.js.map +1 -1
  126. package/react/hoc/index.js.map +1 -1
  127. package/react/hoc/mutation-hoc.js.map +1 -1
  128. package/react/hoc/query-hoc.js.map +1 -1
  129. package/react/hoc/subscription-hoc.js.map +1 -1
  130. package/react/hoc/types.js.map +1 -1
  131. package/react/hoc/withApollo.js.map +1 -1
  132. package/react/hooks/hooks.cjs.js +1 -4
  133. package/react/hooks/hooks.cjs.js.map +1 -1
  134. package/react/hooks/index.js.map +1 -1
  135. package/react/hooks/useApolloClient.js +1 -1
  136. package/react/hooks/useApolloClient.js.map +1 -1
  137. package/react/hooks/useLazyQuery.js.map +1 -1
  138. package/react/hooks/useMutation.js.map +1 -1
  139. package/react/hooks/useQuery.js.map +1 -1
  140. package/react/hooks/useReactiveVar.js.map +1 -1
  141. package/react/hooks/useSubscription.js.map +1 -1
  142. package/react/hooks/utils/useBaseQuery.js.map +1 -1
  143. package/react/hooks/utils/useDeepMemo.js.map +1 -1
  144. package/react/index.js.map +1 -1
  145. package/react/parser/index.js.map +1 -1
  146. package/react/ssr/RenderPromises.js.map +1 -1
  147. package/react/ssr/getDataFromTree.js.map +1 -1
  148. package/react/ssr/index.js.map +1 -1
  149. package/react/ssr/renderToStringWithData.js.map +1 -1
  150. package/react/types/types.js.map +1 -1
  151. package/testing/index.js.map +1 -1
  152. package/utilities/common/arrays.js.map +1 -1
  153. package/utilities/common/canUse.js.map +1 -1
  154. package/utilities/common/cloneDeep.js.map +1 -1
  155. package/utilities/common/compact.js.map +1 -1
  156. package/utilities/common/environment.js.map +1 -1
  157. package/utilities/common/errorHandling.js.map +1 -1
  158. package/utilities/common/filterInPlace.js.map +1 -1
  159. package/utilities/common/maybeDeepFreeze.js.map +1 -1
  160. package/utilities/common/mergeDeep.js.map +1 -1
  161. package/utilities/graphql/directives.js.map +1 -1
  162. package/utilities/graphql/fragments.js.map +1 -1
  163. package/utilities/graphql/getFromAST.js.map +1 -1
  164. package/utilities/graphql/storeUtils.js.map +1 -1
  165. package/utilities/graphql/transform.js.map +1 -1
  166. package/utilities/index.js.map +1 -1
  167. package/utilities/observables/Concast.js.map +1 -1
  168. package/utilities/observables/Observable.js.map +1 -1
  169. package/utilities/observables/asyncMap.js.map +1 -1
  170. package/utilities/observables/iteration.js.map +1 -1
  171. package/utilities/policies/pagination.d.ts +9 -9
  172. package/utilities/policies/pagination.d.ts.map +1 -1
  173. package/utilities/policies/pagination.js +3 -2
  174. package/utilities/policies/pagination.js.map +1 -1
  175. package/utilities/testing/index.js.map +1 -1
  176. package/utilities/testing/itAsync.js.map +1 -1
  177. package/utilities/testing/mocking/MockedProvider.js.map +1 -1
  178. package/utilities/testing/mocking/mockClient.js.map +1 -1
  179. package/utilities/testing/mocking/mockFetch.js.map +1 -1
  180. package/utilities/testing/mocking/mockLink.js.map +1 -1
  181. package/utilities/testing/mocking/mockQueryManager.js.map +1 -1
  182. package/utilities/testing/mocking/mockSubscriptionLink.js.map +1 -1
  183. package/utilities/testing/mocking/mockWatchQuery.js.map +1 -1
  184. package/utilities/testing/observableToPromise.js.map +1 -1
  185. package/utilities/testing/stripSymbols.js.map +1 -1
  186. package/utilities/testing/subscribeAndCount.js.map +1 -1
  187. package/utilities/testing/wrap.js.map +1 -1
  188. package/utilities/utilities.cjs.js +2 -1
  189. package/utilities/utilities.cjs.js.map +1 -1
  190. package/version.js.map +1 -1
@@ -16,7 +16,6 @@ var optimism = require('optimism');
16
16
  var context = require('@wry/context');
17
17
  var gql = _interopDefault(require('graphql-tag'));
18
18
  var React = require('react');
19
- var React__default = _interopDefault(React);
20
19
 
21
20
  function shouldInclude(_a, variables) {
22
21
  var directives = _a.directives;
@@ -1943,16 +1942,16 @@ var ObservableQuery = (function (_super) {
1943
1942
  ObservableQuery.prototype.tearDownQuery = function () {
1944
1943
  if (this.isTornDown)
1945
1944
  return;
1946
- var queryManager = this.queryManager;
1947
1945
  if (this.reobserver) {
1948
1946
  this.reobserver.stop();
1949
1947
  delete this.reobserver;
1950
1948
  }
1951
- this.isTornDown = true;
1949
+ delete this.options.context;
1952
1950
  this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
1953
1951
  this.subscriptions.clear();
1954
- queryManager.stopQuery(this.queryId);
1952
+ this.queryManager.stopQuery(this.queryId);
1955
1953
  this.observers.clear();
1954
+ this.isTornDown = true;
1956
1955
  };
1957
1956
  return ObservableQuery;
1958
1957
  }(Observable));
@@ -2158,7 +2157,12 @@ var EntityStore = (function () {
2158
2157
  fieldsToDirty_1.__exists = 1;
2159
2158
  Object.keys(incoming).forEach(function (storeFieldName) {
2160
2159
  if (!existing || existing[storeFieldName] !== merged[storeFieldName]) {
2161
- fieldsToDirty_1[fieldNameFromStoreName(storeFieldName)] = 1;
2160
+ fieldsToDirty_1[storeFieldName] = 1;
2161
+ var fieldName = fieldNameFromStoreName(storeFieldName);
2162
+ if (fieldName !== storeFieldName &&
2163
+ !_this.policies.hasKeyArgs(merged.__typename, fieldName)) {
2164
+ fieldsToDirty_1[fieldName] = 1;
2165
+ }
2162
2166
  if (merged[storeFieldName] === void 0 && !(_this instanceof Layer)) {
2163
2167
  delete merged[storeFieldName];
2164
2168
  }
@@ -2373,6 +2377,10 @@ var CacheGroup = (function () {
2373
2377
  CacheGroup.prototype.depend = function (dataId, storeFieldName) {
2374
2378
  if (this.d) {
2375
2379
  this.d(makeDepKey(dataId, storeFieldName));
2380
+ var fieldName = fieldNameFromStoreName(storeFieldName);
2381
+ if (fieldName !== storeFieldName) {
2382
+ this.d(makeDepKey(dataId, fieldName));
2383
+ }
2376
2384
  }
2377
2385
  };
2378
2386
  CacheGroup.prototype.dirty = function (dataId, storeFieldName) {
@@ -2383,7 +2391,7 @@ var CacheGroup = (function () {
2383
2391
  return CacheGroup;
2384
2392
  }());
2385
2393
  function makeDepKey(dataId, storeFieldName) {
2386
- return fieldNameFromStoreName(storeFieldName) + '#' + dataId;
2394
+ return storeFieldName + '#' + dataId;
2387
2395
  }
2388
2396
  (function (EntityStore) {
2389
2397
  var Root = (function (_super) {
@@ -2954,10 +2962,12 @@ function warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {
2954
2962
  var varDep = optimism.dep();
2955
2963
  var cacheSlot = new context.Slot();
2956
2964
  function consumeAndIterate(set, callback) {
2957
- var items = [];
2958
- set.forEach(function (item) { return items.push(item); });
2959
- set.clear();
2960
- items.forEach(callback);
2965
+ if (set.size) {
2966
+ var items_1 = [];
2967
+ set.forEach(function (item) { return items_1.push(item); });
2968
+ set.clear();
2969
+ items_1.forEach(callback);
2970
+ }
2961
2971
  }
2962
2972
  var varsByCache = new WeakMap();
2963
2973
  function forgetCache(cache) {
@@ -2981,13 +2991,8 @@ function makeVar(value) {
2981
2991
  }
2982
2992
  else {
2983
2993
  var cache = cacheSlot.getValue();
2984
- if (cache) {
2985
- caches.add(cache);
2986
- var vars = varsByCache.get(cache);
2987
- if (!vars)
2988
- varsByCache.set(cache, vars = new Set);
2989
- vars.add(rv);
2990
- }
2994
+ if (cache)
2995
+ attach(cache);
2991
2996
  varDep(rv);
2992
2997
  }
2993
2998
  return value;
@@ -2998,7 +3003,23 @@ function makeVar(value) {
2998
3003
  listeners.delete(listener);
2999
3004
  };
3000
3005
  };
3001
- rv.forgetCache = function (cache) { return caches.delete(cache); };
3006
+ var attach = rv.attachCache = function (cache) {
3007
+ caches.add(cache);
3008
+ var vars = varsByCache.get(cache);
3009
+ if (!vars)
3010
+ varsByCache.set(cache, vars = new Set);
3011
+ vars.add(rv);
3012
+ return rv;
3013
+ };
3014
+ rv.forgetCache = function (cache) {
3015
+ var deleted = caches.delete(cache);
3016
+ if (deleted) {
3017
+ var vars = varsByCache.get(cache);
3018
+ if (vars)
3019
+ vars.delete(rv);
3020
+ }
3021
+ return deleted;
3022
+ };
3002
3023
  return rv;
3003
3024
  }
3004
3025
  function broadcast(cache) {
@@ -3255,6 +3276,10 @@ var Policies = (function () {
3255
3276
  }
3256
3277
  return false;
3257
3278
  };
3279
+ Policies.prototype.hasKeyArgs = function (typename, fieldName) {
3280
+ var policy = this.getFieldPolicy(typename, fieldName, false);
3281
+ return !!(policy && policy.keyFn);
3282
+ };
3258
3283
  Policies.prototype.getStoreFieldName = function (fieldSpec) {
3259
3284
  var typename = fieldSpec.typename, fieldName = fieldSpec.fieldName;
3260
3285
  var policy = this.getFieldPolicy(typename, fieldName, false);
@@ -3975,6 +4000,12 @@ function wrapDestructiveCacheMethod(cache, methodName) {
3975
4000
  };
3976
4001
  }
3977
4002
  }
4003
+ function cancelNotifyTimeout(info) {
4004
+ if (info["notifyTimeout"]) {
4005
+ clearTimeout(info["notifyTimeout"]);
4006
+ info["notifyTimeout"] = void 0;
4007
+ }
4008
+ }
3978
4009
  var QueryInfo = (function () {
3979
4010
  function QueryInfo(cache) {
3980
4011
  this.cache = cache;
@@ -4068,10 +4099,7 @@ var QueryInfo = (function () {
4068
4099
  };
4069
4100
  QueryInfo.prototype.notify = function () {
4070
4101
  var _this = this;
4071
- if (this.notifyTimeout) {
4072
- clearTimeout(this.notifyTimeout);
4073
- this.notifyTimeout = void 0;
4074
- }
4102
+ cancelNotifyTimeout(this);
4075
4103
  if (this.shouldNotify()) {
4076
4104
  this.listeners.forEach(function (listener) { return listener(_this); });
4077
4105
  }
@@ -4132,6 +4160,7 @@ var QueryInfo = (function () {
4132
4160
  QueryInfo.prototype.markResult = function (result, options, allowCacheWrite) {
4133
4161
  var _this = this;
4134
4162
  this.graphQLErrors = isNonEmptyArray(result.errors) ? result.errors : [];
4163
+ cancelNotifyTimeout(this);
4135
4164
  if (options.fetchPolicy === 'no-cache') {
4136
4165
  this.diff = { result: result.data, complete: true };
4137
4166
  }
@@ -4183,6 +4212,7 @@ var QueryInfo = (function () {
4183
4212
  QueryInfo.prototype.markError = function (error) {
4184
4213
  this.networkStatus = exports.NetworkStatus.error;
4185
4214
  this.lastWrite = void 0;
4215
+ cancelNotifyTimeout(this);
4186
4216
  if (error.graphQLErrors) {
4187
4217
  this.graphQLErrors = error.graphQLErrors;
4188
4218
  }
@@ -5090,27 +5120,19 @@ var ApolloClient = (function () {
5090
5120
  tsInvariant.setVerbosity("warn");
5091
5121
  var resetCaches = gql.resetCaches, disableFragmentWarnings = gql.disableFragmentWarnings, enableExperimentalFragmentVariables = gql.enableExperimentalFragmentVariables, disableExperimentalFragmentVariables = gql.disableExperimentalFragmentVariables;
5092
5122
 
5093
- var contextSymbol = typeof Symbol === 'function' && Symbol.for ?
5094
- Symbol.for('__APOLLO_CONTEXT__') :
5095
- '__APOLLO_CONTEXT__';
5096
- function resetApolloContext() {
5097
- Object.defineProperty(React__default, contextSymbol, {
5098
- value: React__default.createContext({}),
5099
- enumerable: false,
5100
- configurable: true,
5101
- writable: false,
5102
- });
5103
- }
5123
+ var cache = new (canUseWeakMap ? WeakMap : Map)();
5104
5124
  function getApolloContext() {
5105
- if (!React__default[contextSymbol]) {
5106
- resetApolloContext();
5125
+ var context = cache.get(React.createContext);
5126
+ if (!context) {
5127
+ context = React.createContext({});
5128
+ cache.set(React.createContext, context);
5107
5129
  }
5108
- return React__default[contextSymbol];
5130
+ return context;
5109
5131
  }
5110
5132
 
5111
5133
  var ApolloConsumer = function (props) {
5112
5134
  var ApolloContext = getApolloContext();
5113
- return React__default.createElement(ApolloContext.Consumer, null, function (context) {
5135
+ return React.createElement(ApolloContext.Consumer, null, function (context) {
5114
5136
  process.env.NODE_ENV === "production" ? tsInvariant.invariant(context && context.client, 27) : tsInvariant.invariant(context && context.client, 'Could not find "client" in the context of ApolloConsumer. ' +
5115
5137
  'Wrap the root component in an <ApolloProvider>.');
5116
5138
  return props.children(context.client);
@@ -5120,19 +5142,19 @@ var ApolloConsumer = function (props) {
5120
5142
  var ApolloProvider = function (_a) {
5121
5143
  var client = _a.client, children = _a.children;
5122
5144
  var ApolloContext = getApolloContext();
5123
- return React__default.createElement(ApolloContext.Consumer, null, function (context) {
5145
+ return React.createElement(ApolloContext.Consumer, null, function (context) {
5124
5146
  if (context === void 0) { context = {}; }
5125
5147
  if (client && context.client !== client) {
5126
5148
  context = Object.assign({}, context, { client: client });
5127
5149
  }
5128
5150
  process.env.NODE_ENV === "production" ? tsInvariant.invariant(context.client, 28) : tsInvariant.invariant(context.client, 'ApolloProvider was not passed a client instance. Make ' +
5129
5151
  'sure you pass in your client via the "client" prop.');
5130
- return (React__default.createElement(ApolloContext.Provider, { value: context }, children));
5152
+ return (React.createElement(ApolloContext.Provider, { value: context }, children));
5131
5153
  });
5132
5154
  };
5133
5155
 
5134
5156
  function useApolloClient() {
5135
- var client = React__default.useContext(getApolloContext()).client;
5157
+ var client = React.useContext(getApolloContext()).client;
5136
5158
  process.env.NODE_ENV === "production" ? tsInvariant.invariant(client, 33) : tsInvariant.invariant(client, 'No Apollo Client instance can be found. Please ensure that you ' +
5137
5159
  'have called `ApolloProvider` higher up in your tree.');
5138
5160
  return client;
@@ -5143,7 +5165,7 @@ function useApolloClient() {
5143
5165
  DocumentType[DocumentType["Mutation"] = 1] = "Mutation";
5144
5166
  DocumentType[DocumentType["Subscription"] = 2] = "Subscription";
5145
5167
  })(exports.DocumentType || (exports.DocumentType = {}));
5146
- var cache = new Map();
5168
+ var cache$1 = new Map();
5147
5169
  function operationName(type) {
5148
5170
  var name;
5149
5171
  switch (type) {
@@ -5160,7 +5182,7 @@ function operationName(type) {
5160
5182
  return name;
5161
5183
  }
5162
5184
  function parser(document) {
5163
- var cached = cache.get(document);
5185
+ var cached = cache$1.get(document);
5164
5186
  if (cached)
5165
5187
  return cached;
5166
5188
  var variables, type, name;
@@ -5205,7 +5227,7 @@ function parser(document) {
5205
5227
  name = 'data';
5206
5228
  }
5207
5229
  var payload = { name: name, type: type, variables: variables };
5208
- cache.set(document, payload);
5230
+ cache$1.set(document, payload);
5209
5231
  return payload;
5210
5232
  }
5211
5233
 
@@ -5620,7 +5642,8 @@ var QueryData = (function (_super) {
5620
5642
  return result;
5621
5643
  };
5622
5644
  QueryData.prototype.getExecuteSsrResult = function () {
5623
- var ssrDisabled = this.getOptions().ssr === false;
5645
+ var _a = this.getOptions(), ssr = _a.ssr, skip = _a.skip;
5646
+ var ssrDisabled = ssr === false || skip;
5624
5647
  var fetchDisabled = this.refreshClient().client.disableNetworkFetches;
5625
5648
  var ssrLoading = tslib.__assign({ loading: true, networkStatus: exports.NetworkStatus.loading, called: true, data: undefined, stale: false, client: this.client }, this.observableQueryFields());
5626
5649
  if (ssrDisabled && (this.ssrInitiated() || fetchDisabled)) {
@@ -5924,7 +5947,7 @@ exports.mergeOptions = mergeOptions;
5924
5947
  exports.operationName = operationName;
5925
5948
  exports.parseAndCheckHttpResponse = parseAndCheckHttpResponse;
5926
5949
  exports.parser = parser;
5927
- exports.resetApolloContext = resetApolloContext;
5950
+ exports.resetApolloContext = getApolloContext;
5928
5951
  exports.resetCaches = resetCaches;
5929
5952
  exports.rewriteURIForGET = rewriteURIForGET;
5930
5953
  exports.selectHttpOptionsAndBody = selectHttpOptionsAndBody;