@apollo/client 3.4.9 → 3.4.10

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 (213) hide show
  1. package/apollo-client.cjs.js +24 -52
  2. package/apollo-client.cjs.js.map +1 -1
  3. package/apollo-core.cjs.js +22 -16
  4. package/apollo-core.cjs.js.map +1 -1
  5. package/apollo-core.cjs.min.js +1 -1
  6. package/cache/cache.cjs.js +20 -22
  7. package/cache/cache.cjs.js.map +1 -1
  8. package/cache/index.d.ts +1 -0
  9. package/cache/index.d.ts.map +1 -1
  10. package/cache/index.js +1 -2
  11. package/cache/index.js.map +1 -1
  12. package/cache/inmemory/entityStore.js +1 -1
  13. package/cache/inmemory/entityStore.js.map +1 -1
  14. package/cache/inmemory/object-canon.d.ts +1 -0
  15. package/cache/inmemory/object-canon.d.ts.map +1 -1
  16. package/cache/inmemory/object-canon.js +1 -0
  17. package/cache/inmemory/object-canon.js.map +1 -1
  18. package/cache/inmemory/policies.d.ts.map +1 -1
  19. package/cache/inmemory/policies.js +1 -1
  20. package/cache/inmemory/policies.js.map +1 -1
  21. package/cache/inmemory/readFromStore.d.ts.map +1 -1
  22. package/cache/inmemory/readFromStore.js +1 -1
  23. package/cache/inmemory/readFromStore.js.map +1 -1
  24. package/cache/inmemory/writeToStore.d.ts.map +1 -1
  25. package/cache/inmemory/writeToStore.js +1 -1
  26. package/cache/inmemory/writeToStore.js.map +1 -1
  27. package/core/ApolloClient.d.ts.map +1 -1
  28. package/core/ApolloClient.js +1 -1
  29. package/core/ApolloClient.js.map +1 -1
  30. package/core/LocalState.d.ts.map +1 -1
  31. package/core/LocalState.js +1 -1
  32. package/core/LocalState.js.map +1 -1
  33. package/core/ObservableQuery.d.ts.map +1 -1
  34. package/core/ObservableQuery.js +18 -5
  35. package/core/ObservableQuery.js.map +1 -1
  36. package/core/QueryManager.d.ts.map +1 -1
  37. package/core/QueryManager.js +1 -1
  38. package/core/QueryManager.js.map +1 -1
  39. package/core/core.cjs.js +47 -34
  40. package/core/core.cjs.js.map +1 -1
  41. package/core/index.d.ts.map +1 -1
  42. package/core/index.js +1 -2
  43. package/core/index.js.map +1 -1
  44. package/errors/errors.cjs.js +1 -1
  45. package/errors/errors.cjs.js.map +1 -1
  46. package/errors/index.d.ts +1 -0
  47. package/errors/index.d.ts.map +1 -1
  48. package/errors/index.js +1 -2
  49. package/errors/index.js.map +1 -1
  50. package/invariantErrorCodes.js +1 -1
  51. package/link/core/ApolloLink.js +1 -1
  52. package/link/core/ApolloLink.js.map +1 -1
  53. package/link/core/core.cjs.js +4 -6
  54. package/link/core/core.cjs.js.map +1 -1
  55. package/link/core/index.d.ts +1 -0
  56. package/link/core/index.d.ts.map +1 -1
  57. package/link/core/index.js +1 -2
  58. package/link/core/index.js.map +1 -1
  59. package/link/http/checkFetcher.js +1 -1
  60. package/link/http/checkFetcher.js.map +1 -1
  61. package/link/http/createHttpLink.d.ts +1 -0
  62. package/link/http/createHttpLink.d.ts.map +1 -1
  63. package/link/http/createHttpLink.js +1 -0
  64. package/link/http/createHttpLink.js.map +1 -1
  65. package/link/http/http.cjs.js +4 -6
  66. package/link/http/http.cjs.js.map +1 -1
  67. package/link/http/index.d.ts +1 -0
  68. package/link/http/index.d.ts.map +1 -1
  69. package/link/http/index.js +1 -2
  70. package/link/http/index.js.map +1 -1
  71. package/link/http/serializeFetchParameter.d.ts +1 -1
  72. package/link/http/serializeFetchParameter.d.ts.map +1 -1
  73. package/link/http/serializeFetchParameter.js +1 -1
  74. package/link/http/serializeFetchParameter.js.map +1 -1
  75. package/link/persisted-queries/index.d.ts.map +1 -1
  76. package/link/persisted-queries/index.js +1 -3
  77. package/link/persisted-queries/index.js.map +1 -1
  78. package/link/persisted-queries/persisted-queries.cjs.js +5 -6
  79. package/link/persisted-queries/persisted-queries.cjs.js.map +1 -1
  80. package/link/utils/index.d.ts +1 -0
  81. package/link/utils/index.d.ts.map +1 -1
  82. package/link/utils/index.js +1 -2
  83. package/link/utils/index.js.map +1 -1
  84. package/link/utils/toPromise.d.ts.map +1 -1
  85. package/link/utils/toPromise.js +1 -1
  86. package/link/utils/toPromise.js.map +1 -1
  87. package/link/utils/utils.cjs.js +3 -5
  88. package/link/utils/utils.cjs.js.map +1 -1
  89. package/link/utils/validateOperation.d.ts.map +1 -1
  90. package/link/utils/validateOperation.js +1 -1
  91. package/link/utils/validateOperation.js.map +1 -1
  92. package/package.json +1 -1
  93. package/react/context/ApolloConsumer.d.ts.map +1 -1
  94. package/react/context/ApolloConsumer.js +1 -1
  95. package/react/context/ApolloConsumer.js.map +1 -1
  96. package/react/context/ApolloProvider.d.ts.map +1 -1
  97. package/react/context/ApolloProvider.js +1 -1
  98. package/react/context/ApolloProvider.js.map +1 -1
  99. package/react/context/context.cjs.js +6 -8
  100. package/react/context/context.cjs.js.map +1 -1
  101. package/react/context/index.d.ts +1 -0
  102. package/react/context/index.d.ts.map +1 -1
  103. package/react/context/index.js +1 -2
  104. package/react/context/index.js.map +1 -1
  105. package/react/data/OperationData.d.ts.map +1 -1
  106. package/react/data/OperationData.js +1 -1
  107. package/react/data/OperationData.js.map +1 -1
  108. package/react/data/QueryData.d.ts.map +1 -1
  109. package/react/data/QueryData.js +1 -3
  110. package/react/data/QueryData.js.map +1 -1
  111. package/react/data/data.cjs.js +6 -11
  112. package/react/data/data.cjs.js.map +1 -1
  113. package/react/data/index.d.ts +1 -0
  114. package/react/data/index.d.ts.map +1 -1
  115. package/react/data/index.js +1 -2
  116. package/react/data/index.js.map +1 -1
  117. package/react/hoc/hoc-utils.d.ts.map +1 -1
  118. package/react/hoc/hoc-utils.js +1 -1
  119. package/react/hoc/hoc-utils.js.map +1 -1
  120. package/react/hoc/hoc.cjs.js +5 -8
  121. package/react/hoc/hoc.cjs.js.map +1 -1
  122. package/react/hoc/index.d.ts +1 -0
  123. package/react/hoc/index.d.ts.map +1 -1
  124. package/react/hoc/index.js +1 -2
  125. package/react/hoc/index.js.map +1 -1
  126. package/react/hoc/withApollo.d.ts.map +1 -1
  127. package/react/hoc/withApollo.js +1 -1
  128. package/react/hoc/withApollo.js.map +1 -1
  129. package/react/hooks/hooks.cjs.js +3 -6
  130. package/react/hooks/hooks.cjs.js.map +1 -1
  131. package/react/hooks/index.d.ts +1 -0
  132. package/react/hooks/index.d.ts.map +1 -1
  133. package/react/hooks/index.js +1 -2
  134. package/react/hooks/index.js.map +1 -1
  135. package/react/hooks/useApolloClient.d.ts.map +1 -1
  136. package/react/hooks/useApolloClient.js +1 -1
  137. package/react/hooks/useApolloClient.js.map +1 -1
  138. package/react/hooks/useSubscription.d.ts +1 -0
  139. package/react/hooks/useSubscription.d.ts.map +1 -1
  140. package/react/hooks/useSubscription.js +1 -0
  141. package/react/hooks/useSubscription.js.map +1 -1
  142. package/react/hooks/utils/useAfterFastRefresh.d.ts +1 -0
  143. package/react/hooks/utils/useAfterFastRefresh.d.ts.map +1 -1
  144. package/react/hooks/utils/useAfterFastRefresh.js +1 -0
  145. package/react/hooks/utils/useAfterFastRefresh.js.map +1 -1
  146. package/react/hooks/utils/useBaseQuery.d.ts +1 -0
  147. package/react/hooks/utils/useBaseQuery.d.ts.map +1 -1
  148. package/react/hooks/utils/useBaseQuery.js +1 -0
  149. package/react/hooks/utils/useBaseQuery.js.map +1 -1
  150. package/react/index.d.ts +1 -0
  151. package/react/index.d.ts.map +1 -1
  152. package/react/index.js +1 -2
  153. package/react/index.js.map +1 -1
  154. package/react/parser/index.d.ts.map +1 -1
  155. package/react/parser/index.js +1 -3
  156. package/react/parser/index.js.map +1 -1
  157. package/react/parser/parser.cjs.js +9 -11
  158. package/react/parser/parser.cjs.js.map +1 -1
  159. package/react/react.cjs.js +2 -2
  160. package/react/react.cjs.js.map +1 -1
  161. package/testing/index.d.ts +1 -0
  162. package/testing/index.d.ts.map +1 -1
  163. package/testing/index.js +1 -2
  164. package/testing/index.js.map +1 -1
  165. package/testing/testing.cjs.js +3 -5
  166. package/testing/testing.cjs.js.map +1 -1
  167. package/utilities/globals/DEV.js +2 -2
  168. package/utilities/globals/DEV.js.map +1 -1
  169. package/utilities/{common → globals}/global.d.ts +0 -0
  170. package/utilities/globals/global.d.ts.map +1 -0
  171. package/utilities/{common → globals}/global.js +0 -0
  172. package/utilities/globals/global.js.map +1 -0
  173. package/utilities/globals/globals.cjs.js +56 -0
  174. package/utilities/globals/globals.cjs.js.map +1 -0
  175. package/utilities/globals/index.d.ts +4 -2
  176. package/utilities/globals/index.d.ts.map +1 -1
  177. package/utilities/globals/index.js +4 -2
  178. package/utilities/globals/index.js.map +1 -1
  179. package/utilities/{common → globals}/maybe.d.ts +0 -0
  180. package/utilities/globals/maybe.d.ts.map +1 -0
  181. package/utilities/{common → globals}/maybe.js +0 -0
  182. package/utilities/globals/maybe.js.map +1 -0
  183. package/utilities/globals/package.json +7 -0
  184. package/utilities/graphql/directives.d.ts.map +1 -1
  185. package/utilities/graphql/directives.js +1 -1
  186. package/utilities/graphql/directives.js.map +1 -1
  187. package/utilities/graphql/fragments.d.ts.map +1 -1
  188. package/utilities/graphql/fragments.js +1 -1
  189. package/utilities/graphql/fragments.js.map +1 -1
  190. package/utilities/graphql/getFromAST.d.ts.map +1 -1
  191. package/utilities/graphql/getFromAST.js +1 -1
  192. package/utilities/graphql/getFromAST.js.map +1 -1
  193. package/utilities/graphql/storeUtils.d.ts.map +1 -1
  194. package/utilities/graphql/storeUtils.js +1 -1
  195. package/utilities/graphql/storeUtils.js.map +1 -1
  196. package/utilities/graphql/transform.d.ts.map +1 -1
  197. package/utilities/graphql/transform.js +1 -1
  198. package/utilities/graphql/transform.js.map +1 -1
  199. package/utilities/index.d.ts +1 -3
  200. package/utilities/index.d.ts.map +1 -1
  201. package/utilities/index.js +1 -4
  202. package/utilities/index.js.map +1 -1
  203. package/utilities/package.json +1 -3
  204. package/utilities/testing/mocking/mockLink.d.ts.map +1 -1
  205. package/utilities/testing/mocking/mockLink.js +1 -1
  206. package/utilities/testing/mocking/mockLink.js.map +1 -1
  207. package/utilities/utilities.cjs.js +23 -68
  208. package/utilities/utilities.cjs.js.map +1 -1
  209. package/version.js +1 -1
  210. package/utilities/common/global.d.ts.map +0 -1
  211. package/utilities/common/global.js.map +0 -1
  212. package/utilities/common/maybe.d.ts.map +0 -1
  213. package/utilities/common/maybe.js.map +0 -1
@@ -2,54 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tsInvariant = require('ts-invariant');
6
- var process$1 = require('ts-invariant/process');
5
+ var globals = require('./globals');
7
6
  var graphql = require('graphql');
8
7
  var tslib = require('tslib');
9
8
  var zenObservableTs = require('zen-observable-ts');
10
9
  require('symbol-observable');
11
10
 
12
- function maybe(thunk) {
13
- try {
14
- return thunk();
15
- }
16
- catch (_a) { }
17
- }
18
-
19
- var global$1 = (maybe(function () { return globalThis; }) ||
20
- maybe(function () { return window; }) ||
21
- maybe(function () { return self; }) ||
22
- maybe(function () { return global; }) ||
23
- maybe(function () { return Function("return this")(); }));
24
-
25
- var __ = "__";
26
- var GLOBAL_KEY = [__, __].join("DEV");
27
- function getDEV() {
28
- try {
29
- return Boolean(__DEV__);
30
- }
31
- catch (_a) {
32
- Object.defineProperty(global$1, GLOBAL_KEY, {
33
- value: maybe(function () { return process.env.NODE_ENV; }) !== "production",
34
- enumerable: false,
35
- configurable: true,
36
- writable: true,
37
- });
38
- return global$1[GLOBAL_KEY];
39
- }
40
- }
41
- var DEV = getDEV();
42
-
43
- function removeTemporaryGlobals() {
44
- graphql.isType(null);
45
- return process$1.remove();
46
- }
47
-
48
- function checkDEV() {
49
- __DEV__ ? tsInvariant.invariant("boolean" === typeof DEV, DEV) : tsInvariant.invariant("boolean" === typeof DEV, 38);
50
- }
51
- removeTemporaryGlobals();
52
-
53
11
  function shouldInclude(_a, variables) {
54
12
  var directives = _a.directives;
55
13
  if (!directives || !directives.length) {
@@ -60,7 +18,7 @@ function shouldInclude(_a, variables) {
60
18
  var evaledValue = false;
61
19
  if (ifArgument.value.kind === 'Variable') {
62
20
  evaledValue = variables && variables[ifArgument.value.name.value];
63
- __DEV__ ? tsInvariant.invariant(evaledValue !== void 0, "Invalid variable referenced in @" + directive.name.value + " directive.") : tsInvariant.invariant(evaledValue !== void 0, 39);
21
+ __DEV__ ? globals.invariant(evaledValue !== void 0, "Invalid variable referenced in @" + directive.name.value + " directive.") : globals.invariant(evaledValue !== void 0, 39);
64
22
  }
65
23
  else {
66
24
  evaledValue = ifArgument.value.value;
@@ -97,12 +55,12 @@ function getInclusionDirectives(directives) {
97
55
  return;
98
56
  var directiveArguments = directive.arguments;
99
57
  var directiveName = directive.name.value;
100
- __DEV__ ? tsInvariant.invariant(directiveArguments && directiveArguments.length === 1, "Incorrect number of arguments for the @" + directiveName + " directive.") : tsInvariant.invariant(directiveArguments && directiveArguments.length === 1, 40);
58
+ __DEV__ ? globals.invariant(directiveArguments && directiveArguments.length === 1, "Incorrect number of arguments for the @" + directiveName + " directive.") : globals.invariant(directiveArguments && directiveArguments.length === 1, 40);
101
59
  var ifArgument = directiveArguments[0];
102
- __DEV__ ? tsInvariant.invariant(ifArgument.name && ifArgument.name.value === 'if', "Invalid argument for the @" + directiveName + " directive.") : tsInvariant.invariant(ifArgument.name && ifArgument.name.value === 'if', 41);
60
+ __DEV__ ? globals.invariant(ifArgument.name && ifArgument.name.value === 'if', "Invalid argument for the @" + directiveName + " directive.") : globals.invariant(ifArgument.name && ifArgument.name.value === 'if', 41);
103
61
  var ifValue = ifArgument.value;
104
- __DEV__ ? tsInvariant.invariant(ifValue &&
105
- (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), "Argument for the @" + directiveName + " directive must be a variable or a boolean value.") : tsInvariant.invariant(ifValue &&
62
+ __DEV__ ? globals.invariant(ifValue &&
63
+ (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), "Argument for the @" + directiveName + " directive must be a variable or a boolean value.") : globals.invariant(ifValue &&
106
64
  (ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), 42);
107
65
  result.push({ directive: directive, ifArgument: ifArgument });
108
66
  });
@@ -115,15 +73,15 @@ function getFragmentQueryDocument(document, fragmentName) {
115
73
  var fragments = [];
116
74
  document.definitions.forEach(function (definition) {
117
75
  if (definition.kind === 'OperationDefinition') {
118
- throw __DEV__ ? new tsInvariant.InvariantError("Found a " + definition.operation + " operation" + (definition.name ? " named '" + definition.name.value + "'" : '') + ". " +
119
- 'No operations are allowed when using a fragment as a query. Only fragments are allowed.') : new tsInvariant.InvariantError(43);
76
+ throw __DEV__ ? new globals.InvariantError("Found a " + definition.operation + " operation" + (definition.name ? " named '" + definition.name.value + "'" : '') + ". " +
77
+ 'No operations are allowed when using a fragment as a query. Only fragments are allowed.') : new globals.InvariantError(43);
120
78
  }
121
79
  if (definition.kind === 'FragmentDefinition') {
122
80
  fragments.push(definition);
123
81
  }
124
82
  });
125
83
  if (typeof actualFragmentName === 'undefined') {
126
- __DEV__ ? tsInvariant.invariant(fragments.length === 1, "Found " + fragments.length + " fragments. `fragmentName` must be provided when there is not exactly 1 fragment.") : tsInvariant.invariant(fragments.length === 1, 44);
84
+ __DEV__ ? globals.invariant(fragments.length === 1, "Found " + fragments.length + " fragments. `fragmentName` must be provided when there is not exactly 1 fragment.") : globals.invariant(fragments.length === 1, 44);
127
85
  actualFragmentName = fragments[0].name.value;
128
86
  }
129
87
  var query = tslib.__assign(tslib.__assign({}, document), { definitions: tslib.__spreadArray([
@@ -160,7 +118,7 @@ function getFragmentFromSelection(selection, fragmentMap) {
160
118
  return selection;
161
119
  case 'FragmentSpread': {
162
120
  var fragment = fragmentMap && fragmentMap[selection.name.value];
163
- __DEV__ ? tsInvariant.invariant(fragment, "No fragment named " + selection.name.value + ".") : tsInvariant.invariant(fragment, 45);
121
+ __DEV__ ? globals.invariant(fragment, "No fragment named " + selection.name.value + ".") : globals.invariant(fragment, 45);
164
122
  return fragment;
165
123
  }
166
124
  default:
@@ -242,9 +200,9 @@ function valueToObjectRepresentation(argObj, name, value, variables) {
242
200
  argObj[name.value] = null;
243
201
  }
244
202
  else {
245
- throw __DEV__ ? new tsInvariant.InvariantError("The inline argument \"" + name.value + "\" of kind \"" + value.kind + "\"" +
203
+ throw __DEV__ ? new globals.InvariantError("The inline argument \"" + name.value + "\" of kind \"" + value.kind + "\"" +
246
204
  'is not supported. Use variables instead of inline arguments to ' +
247
- 'overcome this limitation.') : new tsInvariant.InvariantError(54);
205
+ 'overcome this limitation.') : new globals.InvariantError(54);
248
206
  }
249
207
  }
250
208
  function storeKeyNameFromField(field, variables) {
@@ -378,16 +336,16 @@ function isInlineFragment(selection) {
378
336
  }
379
337
 
380
338
  function checkDocument(doc) {
381
- __DEV__ ? tsInvariant.invariant(doc && doc.kind === 'Document', "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql") : tsInvariant.invariant(doc && doc.kind === 'Document', 46);
339
+ __DEV__ ? globals.invariant(doc && doc.kind === 'Document', "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql") : globals.invariant(doc && doc.kind === 'Document', 46);
382
340
  var operations = doc.definitions
383
341
  .filter(function (d) { return d.kind !== 'FragmentDefinition'; })
384
342
  .map(function (definition) {
385
343
  if (definition.kind !== 'OperationDefinition') {
386
- throw __DEV__ ? new tsInvariant.InvariantError("Schema type definitions not allowed in queries. Found: \"" + definition.kind + "\"") : new tsInvariant.InvariantError(47);
344
+ throw __DEV__ ? new globals.InvariantError("Schema type definitions not allowed in queries. Found: \"" + definition.kind + "\"") : new globals.InvariantError(47);
387
345
  }
388
346
  return definition;
389
347
  });
390
- __DEV__ ? tsInvariant.invariant(operations.length <= 1, "Ambiguous GraphQL document: contains " + operations.length + " operations") : tsInvariant.invariant(operations.length <= 1, 48);
348
+ __DEV__ ? globals.invariant(operations.length <= 1, "Ambiguous GraphQL document: contains " + operations.length + " operations") : globals.invariant(operations.length <= 1, 48);
391
349
  return doc;
392
350
  }
393
351
  function getOperationDefinition(doc) {
@@ -406,14 +364,14 @@ function getFragmentDefinitions(doc) {
406
364
  }
407
365
  function getQueryDefinition(doc) {
408
366
  var queryDef = getOperationDefinition(doc);
409
- __DEV__ ? tsInvariant.invariant(queryDef && queryDef.operation === 'query', 'Must contain a query definition.') : tsInvariant.invariant(queryDef && queryDef.operation === 'query', 49);
367
+ __DEV__ ? globals.invariant(queryDef && queryDef.operation === 'query', 'Must contain a query definition.') : globals.invariant(queryDef && queryDef.operation === 'query', 49);
410
368
  return queryDef;
411
369
  }
412
370
  function getFragmentDefinition(doc) {
413
- __DEV__ ? tsInvariant.invariant(doc.kind === 'Document', "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql") : tsInvariant.invariant(doc.kind === 'Document', 50);
414
- __DEV__ ? tsInvariant.invariant(doc.definitions.length <= 1, 'Fragment must have exactly one definition.') : tsInvariant.invariant(doc.definitions.length <= 1, 51);
371
+ __DEV__ ? globals.invariant(doc.kind === 'Document', "Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a \"gql\" tag? http://docs.apollostack.com/apollo-client/core.html#gql") : globals.invariant(doc.kind === 'Document', 50);
372
+ __DEV__ ? globals.invariant(doc.definitions.length <= 1, 'Fragment must have exactly one definition.') : globals.invariant(doc.definitions.length <= 1, 51);
415
373
  var fragmentDef = doc.definitions[0];
416
- __DEV__ ? tsInvariant.invariant(fragmentDef.kind === 'FragmentDefinition', 'Must be a fragment definition.') : tsInvariant.invariant(fragmentDef.kind === 'FragmentDefinition', 52);
374
+ __DEV__ ? globals.invariant(fragmentDef.kind === 'FragmentDefinition', 'Must be a fragment definition.') : globals.invariant(fragmentDef.kind === 'FragmentDefinition', 52);
417
375
  return fragmentDef;
418
376
  }
419
377
  function getMainDefinition(queryDoc) {
@@ -436,7 +394,7 @@ function getMainDefinition(queryDoc) {
436
394
  if (fragmentDefinition) {
437
395
  return fragmentDefinition;
438
396
  }
439
- throw __DEV__ ? new tsInvariant.InvariantError('Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.') : new tsInvariant.InvariantError(53);
397
+ throw __DEV__ ? new globals.InvariantError('Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment.') : new globals.InvariantError(53);
440
398
  }
441
399
  function getDefaultValues(definition) {
442
400
  var defaultValues = Object.create(null);
@@ -594,7 +552,7 @@ var connectionRemoveConfig = {
594
552
  if (willRemove) {
595
553
  if (!directive.arguments ||
596
554
  !directive.arguments.some(function (arg) { return arg.name.value === 'key'; })) {
597
- __DEV__ && tsInvariant.invariant.warn('Removing an @connection directive even though it does not have a key. ' +
555
+ __DEV__ && globals.invariant.warn('Removing an @connection directive even though it does not have a key. ' +
598
556
  'You may want to use the key parameter to specify a store key.');
599
557
  }
600
558
  }
@@ -1225,11 +1183,10 @@ function stringifyForDisplay(value) {
1225
1183
  }).split(JSON.stringify(undefId)).join("<undefined>");
1226
1184
  }
1227
1185
 
1228
- checkDEV();
1229
-
1186
+ exports.DEV = globals.DEV;
1187
+ exports.maybe = globals.maybe;
1230
1188
  exports.Observable = zenObservableTs.Observable;
1231
1189
  exports.Concast = Concast;
1232
- exports.DEV = DEV;
1233
1190
  exports.DeepMerger = DeepMerger;
1234
1191
  exports.addTypenameToDocument = addTypenameToDocument;
1235
1192
  exports.argumentsObjectFromField = argumentsObjectFromField;
@@ -1237,7 +1194,6 @@ exports.asyncMap = asyncMap;
1237
1194
  exports.buildQueryFromSelectionSet = buildQueryFromSelectionSet;
1238
1195
  exports.canUseWeakMap = canUseWeakMap;
1239
1196
  exports.canUseWeakSet = canUseWeakSet;
1240
- exports.checkDEV = checkDEV;
1241
1197
  exports.checkDocument = checkDocument;
1242
1198
  exports.cloneDeep = cloneDeep;
1243
1199
  exports.compact = compact;
@@ -1269,7 +1225,6 @@ exports.isReference = isReference;
1269
1225
  exports.iterateObserversSafely = iterateObserversSafely;
1270
1226
  exports.makeReference = makeReference;
1271
1227
  exports.makeUniqueId = makeUniqueId;
1272
- exports.maybe = maybe;
1273
1228
  exports.maybeDeepFreeze = maybeDeepFreeze;
1274
1229
  exports.mergeDeep = mergeDeep;
1275
1230
  exports.mergeDeepArray = mergeDeepArray;