@apollo/client 4.0.0-alpha.20 → 4.0.0-alpha.22

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 (214) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/__cjs/cache/core/cache.cjs +1 -1
  3. package/__cjs/cache/inmemory/entityStore.cjs +3 -3
  4. package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
  5. package/__cjs/cache/inmemory/policies.cjs +4 -4
  6. package/__cjs/cache/inmemory/policies.cjs.map +1 -1
  7. package/__cjs/cache/inmemory/readFromStore.cjs +2 -2
  8. package/__cjs/cache/inmemory/writeToStore.cjs +4 -4
  9. package/__cjs/core/ApolloClient.cjs +22 -19
  10. package/__cjs/core/ApolloClient.cjs.map +1 -1
  11. package/__cjs/core/ApolloClient.d.cts +7 -8
  12. package/__cjs/core/ObservableQuery.cjs +15 -11
  13. package/__cjs/core/ObservableQuery.cjs.map +1 -1
  14. package/__cjs/core/ObservableQuery.d.cts +1 -2
  15. package/__cjs/core/QueryInfo.cjs +223 -34
  16. package/__cjs/core/QueryInfo.cjs.map +1 -1
  17. package/__cjs/core/QueryInfo.d.cts +34 -24
  18. package/__cjs/core/QueryManager.cjs +89 -265
  19. package/__cjs/core/QueryManager.cjs.map +1 -1
  20. package/__cjs/core/QueryManager.d.cts +13 -38
  21. package/__cjs/core/index.cjs.map +1 -1
  22. package/__cjs/core/index.d.cts +1 -1
  23. package/__cjs/core/networkStatus.cjs +7 -1
  24. package/__cjs/core/networkStatus.cjs.map +1 -1
  25. package/__cjs/core/networkStatus.d.cts +7 -1
  26. package/__cjs/core/types.d.cts +5 -4
  27. package/__cjs/invariantErrorCodes.cjs +99 -104
  28. package/__cjs/link/batch-http/batchHttpLink.cjs +14 -14
  29. package/__cjs/link/batch-http/batchHttpLink.cjs.map +1 -1
  30. package/__cjs/link/batch-http/batchHttpLink.d.cts +4 -0
  31. package/__cjs/link/batch-http/index.cjs +2 -1
  32. package/__cjs/link/batch-http/index.cjs.map +1 -1
  33. package/__cjs/link/batch-http/index.d.cts +1 -1
  34. package/__cjs/link/client-awareness/ClientAwarenessLink.cjs +45 -0
  35. package/__cjs/link/client-awareness/ClientAwarenessLink.cjs.map +1 -0
  36. package/__cjs/link/client-awareness/ClientAwarenessLink.d.cts +62 -0
  37. package/__cjs/link/client-awareness/index.cjs +6 -0
  38. package/__cjs/link/client-awareness/index.cjs.map +1 -0
  39. package/__cjs/link/client-awareness/index.d.cts +2 -0
  40. package/__cjs/link/core/ApolloLink.cjs +2 -2
  41. package/__cjs/link/core/types.d.cts +1 -6
  42. package/__cjs/link/http/BaseHttpLink.cjs +117 -0
  43. package/__cjs/link/http/BaseHttpLink.cjs.map +1 -0
  44. package/__cjs/link/http/BaseHttpLink.d.cts +6 -0
  45. package/__cjs/link/http/HttpLink.cjs +8 -5
  46. package/__cjs/link/http/HttpLink.cjs.map +1 -1
  47. package/__cjs/link/http/HttpLink.d.cts +16 -4
  48. package/__cjs/link/http/index.cjs +4 -3
  49. package/__cjs/link/http/index.cjs.map +1 -1
  50. package/__cjs/link/http/index.d.cts +2 -2
  51. package/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
  52. package/__cjs/link/http/selectHttpOptionsAndBody.cjs +6 -5
  53. package/__cjs/link/http/selectHttpOptionsAndBody.cjs.map +1 -1
  54. package/__cjs/link/http/serializeFetchParameter.cjs +1 -1
  55. package/__cjs/link/persisted-queries/index.cjs +7 -5
  56. package/__cjs/link/persisted-queries/index.cjs.map +1 -1
  57. package/__cjs/local-state/LocalState.cjs +0 -8
  58. package/__cjs/local-state/LocalState.cjs.map +1 -1
  59. package/__cjs/masking/maskDefinition.cjs +2 -2
  60. package/__cjs/masking/maskDefinition.cjs.map +1 -1
  61. package/__cjs/masking/maskFragment.cjs +2 -10
  62. package/__cjs/masking/maskFragment.cjs.map +1 -1
  63. package/__cjs/masking/maskOperation.cjs +1 -9
  64. package/__cjs/masking/maskOperation.cjs.map +1 -1
  65. package/__cjs/masking/utils.cjs +0 -8
  66. package/__cjs/masking/utils.cjs.map +1 -1
  67. package/__cjs/masking/utils.d.cts +0 -1
  68. package/__cjs/react/context/ApolloConsumer.cjs +1 -1
  69. package/__cjs/react/context/ApolloContext.cjs +1 -1
  70. package/__cjs/react/context/ApolloProvider.cjs +1 -1
  71. package/__cjs/react/hooks/internal/validateSuspenseHookOptions.cjs +2 -2
  72. package/__cjs/react/hooks/useApolloClient.cjs +1 -1
  73. package/__cjs/react/hooks/useLazyQuery.cjs +3 -4
  74. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  75. package/__cjs/react/hooks/useLazyQuery.d.cts +0 -8
  76. package/__cjs/react/hooks/useLoadableQuery.cjs +2 -2
  77. package/__cjs/react/hooks/useSubscription.cjs +1 -1
  78. package/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
  79. package/__cjs/react/internal/cache/QueryReference.cjs +1 -1
  80. package/__cjs/react/ssr/prerenderStatic.cjs +2 -2
  81. package/__cjs/testing/core/mocking/mockLink.cjs +4 -4
  82. package/__cjs/utilities/caching/sizes.cjs.map +1 -1
  83. package/__cjs/utilities/caching/sizes.d.cts +6 -0
  84. package/__cjs/utilities/graphql/DocumentTransform.cjs +1 -1
  85. package/__cjs/utilities/index.cjs +1 -16
  86. package/__cjs/utilities/index.cjs.map +1 -1
  87. package/__cjs/utilities/index.d.cts +0 -13
  88. package/__cjs/utilities/internal/checkDocument.cjs +47 -13
  89. package/__cjs/utilities/internal/checkDocument.cjs.map +1 -1
  90. package/__cjs/utilities/internal/checkDocument.d.cts +1 -1
  91. package/__cjs/utilities/internal/getFragmentDefinition.cjs +3 -3
  92. package/__cjs/utilities/internal/getFragmentFromSelection.cjs +1 -1
  93. package/__cjs/utilities/internal/getFragmentQueryDocument.cjs +2 -2
  94. package/__cjs/utilities/internal/getMainDefinition.cjs +1 -1
  95. package/__cjs/utilities/internal/getMemoryInternals.cjs +1 -0
  96. package/__cjs/utilities/internal/getMemoryInternals.cjs.map +1 -1
  97. package/__cjs/utilities/internal/getMemoryInternals.d.cts +0 -1
  98. package/__cjs/utilities/internal/getQueryDefinition.cjs +1 -1
  99. package/__cjs/utilities/internal/removeDirectivesFromDocument.cjs +1 -1
  100. package/__cjs/utilities/internal/shouldInclude.cjs +4 -4
  101. package/__cjs/utilities/internal/valueToObjectRepresentation.cjs +1 -1
  102. package/__cjs/version.cjs +1 -1
  103. package/cache/core/cache.js +1 -1
  104. package/cache/inmemory/entityStore.js +3 -3
  105. package/cache/inmemory/key-extractor.js +1 -1
  106. package/cache/inmemory/policies.js +4 -4
  107. package/cache/inmemory/policies.js.map +1 -1
  108. package/cache/inmemory/readFromStore.js +2 -2
  109. package/cache/inmemory/writeToStore.js +4 -4
  110. package/core/ApolloClient.d.ts +7 -8
  111. package/core/ApolloClient.js +23 -20
  112. package/core/ApolloClient.js.map +1 -1
  113. package/core/ObservableQuery.d.ts +1 -2
  114. package/core/ObservableQuery.js +15 -11
  115. package/core/ObservableQuery.js.map +1 -1
  116. package/core/QueryInfo.d.ts +34 -24
  117. package/core/QueryInfo.js +221 -34
  118. package/core/QueryInfo.js.map +1 -1
  119. package/core/QueryManager.d.ts +13 -38
  120. package/core/QueryManager.js +91 -267
  121. package/core/QueryManager.js.map +1 -1
  122. package/core/index.d.ts +1 -1
  123. package/core/index.js.map +1 -1
  124. package/core/networkStatus.d.ts +7 -1
  125. package/core/networkStatus.js +7 -1
  126. package/core/networkStatus.js.map +1 -1
  127. package/core/types.d.ts +5 -4
  128. package/invariantErrorCodes.js +99 -104
  129. package/legacyEntryPoints/link/client-awareness/client-awareness.cjs +1 -0
  130. package/legacyEntryPoints/link/client-awareness/client-awareness.d.cts +1 -0
  131. package/legacyEntryPoints/link/client-awareness/index.d.ts +1 -0
  132. package/legacyEntryPoints/link/client-awareness/index.js +1 -0
  133. package/link/batch-http/batchHttpLink.d.ts +4 -0
  134. package/link/batch-http/batchHttpLink.js +11 -12
  135. package/link/batch-http/batchHttpLink.js.map +1 -1
  136. package/link/batch-http/index.d.ts +1 -1
  137. package/link/batch-http/index.js +1 -1
  138. package/link/batch-http/index.js.map +1 -1
  139. package/link/client-awareness/ClientAwarenessLink.d.ts +62 -0
  140. package/link/client-awareness/ClientAwarenessLink.js +41 -0
  141. package/link/client-awareness/ClientAwarenessLink.js.map +1 -0
  142. package/link/client-awareness/index.d.ts +2 -0
  143. package/link/client-awareness/index.js +2 -0
  144. package/link/client-awareness/index.js.map +1 -0
  145. package/link/core/ApolloLink.js +2 -2
  146. package/link/core/types.d.ts +1 -6
  147. package/link/http/BaseHttpLink.d.ts +6 -0
  148. package/link/http/BaseHttpLink.js +113 -0
  149. package/link/http/BaseHttpLink.js.map +1 -0
  150. package/link/http/HttpLink.d.ts +16 -4
  151. package/link/http/HttpLink.js +6 -4
  152. package/link/http/HttpLink.js.map +1 -1
  153. package/link/http/index.d.ts +2 -2
  154. package/link/http/index.js +2 -2
  155. package/link/http/index.js.map +1 -1
  156. package/link/http/parseAndCheckHttpResponse.js +1 -1
  157. package/link/http/selectHttpOptionsAndBody.js +6 -5
  158. package/link/http/selectHttpOptionsAndBody.js.map +1 -1
  159. package/link/http/serializeFetchParameter.js +1 -1
  160. package/link/persisted-queries/index.js +7 -5
  161. package/link/persisted-queries/index.js.map +1 -1
  162. package/local-state/LocalState.js +0 -8
  163. package/local-state/LocalState.js.map +1 -1
  164. package/masking/maskDefinition.js +2 -2
  165. package/masking/maskDefinition.js.map +1 -1
  166. package/masking/maskFragment.js +2 -10
  167. package/masking/maskFragment.js.map +1 -1
  168. package/masking/maskOperation.js +1 -9
  169. package/masking/maskOperation.js.map +1 -1
  170. package/masking/utils.d.ts +0 -1
  171. package/masking/utils.js +0 -7
  172. package/masking/utils.js.map +1 -1
  173. package/package.json +7 -1
  174. package/react/context/ApolloConsumer.js +1 -1
  175. package/react/context/ApolloContext.js +1 -1
  176. package/react/context/ApolloProvider.js +1 -1
  177. package/react/hooks/internal/validateSuspenseHookOptions.js +2 -2
  178. package/react/hooks/useApolloClient.js +1 -1
  179. package/react/hooks/useLazyQuery.d.ts +0 -8
  180. package/react/hooks/useLazyQuery.js +3 -4
  181. package/react/hooks/useLazyQuery.js.map +1 -1
  182. package/react/hooks/useLoadableQuery.js +2 -2
  183. package/react/hooks/useSubscription.js +1 -1
  184. package/react/hooks/useSyncExternalStore.js +1 -1
  185. package/react/internal/cache/QueryReference.js +1 -1
  186. package/react/ssr/prerenderStatic.js +2 -2
  187. package/testing/core/mocking/mockLink.js +4 -4
  188. package/utilities/caching/sizes.d.ts +6 -0
  189. package/utilities/caching/sizes.js.map +1 -1
  190. package/utilities/graphql/DocumentTransform.js +1 -1
  191. package/utilities/index.d.ts +0 -13
  192. package/utilities/index.js +0 -12
  193. package/utilities/index.js.map +1 -1
  194. package/utilities/internal/checkDocument.d.ts +1 -1
  195. package/utilities/internal/checkDocument.js +46 -12
  196. package/utilities/internal/checkDocument.js.map +1 -1
  197. package/utilities/internal/getFragmentDefinition.js +3 -3
  198. package/utilities/internal/getFragmentFromSelection.js +1 -1
  199. package/utilities/internal/getFragmentQueryDocument.js +2 -2
  200. package/utilities/internal/getMainDefinition.js +1 -1
  201. package/utilities/internal/getMemoryInternals.d.ts +0 -1
  202. package/utilities/internal/getMemoryInternals.js +1 -0
  203. package/utilities/internal/getMemoryInternals.js.map +1 -1
  204. package/utilities/internal/getQueryDefinition.js +1 -1
  205. package/utilities/internal/removeDirectivesFromDocument.js +1 -1
  206. package/utilities/internal/shouldInclude.js +4 -4
  207. package/utilities/internal/valueToObjectRepresentation.js +1 -1
  208. package/version.js +1 -1
  209. package/__cjs/link/http/createHttpLink.cjs +0 -151
  210. package/__cjs/link/http/createHttpLink.cjs.map +0 -1
  211. package/__cjs/link/http/createHttpLink.d.cts +0 -4
  212. package/link/http/createHttpLink.d.ts +0 -4
  213. package/link/http/createHttpLink.js +0 -143
  214. package/link/http/createHttpLink.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,118 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 4.0.0-alpha.22
4
+
5
+ ### Major Changes
6
+
7
+ - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - The `includeExtensions` option of `HttpLink` and `BatchHttpLink` now defaults
8
+ to `true`.
9
+
10
+ If `includeExtensions` is `true`, but `extensions` is not set or empty, extensions
11
+ will not be included in outgoing requests.
12
+
13
+ - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - The `ApolloClient` constructor options `name` and `version` that are used to
14
+ configure the client awareness feature have moved onto a `clientAwareness` key.
15
+
16
+ ```diff
17
+ const client = new ApolloClient({
18
+ // ..
19
+ - name: "my-app",
20
+ - version: "1.0.0",
21
+ + clientAwareness: {
22
+ + name: "my-app",
23
+ + version: "1.0.0",
24
+ + },
25
+ });
26
+ ```
27
+
28
+ - [#12690](https://github.com/apollographql/apollo-client/pull/12690) [`5812759`](https://github.com/apollographql/apollo-client/commit/5812759b6659df49277635e89492c0d72c3b57d6) Thanks [@phryneas](https://github.com/phryneas)! - Aliasing any other field to `__typename` is now forbidden.
29
+
30
+ - [#12690](https://github.com/apollographql/apollo-client/pull/12690) [`5812759`](https://github.com/apollographql/apollo-client/commit/5812759b6659df49277635e89492c0d72c3b57d6) Thanks [@phryneas](https://github.com/phryneas)! - Aliasing a field to an alias beginning with `__ac_` is now forbidden - this namespace is now reserved for internal use.
31
+
32
+ - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Adds enhanced client awareness to the client.
33
+
34
+ `HttpLink` and `BatchHttpLink` will now per default send information about the
35
+ client library you are using in `extensions`.
36
+
37
+ This could look like this:
38
+
39
+ ```json
40
+ {
41
+ "query": "query GetUser($id: ID!) { user(id: $id) { __typename id name } }",
42
+ "variables": {
43
+ "id": 5
44
+ },
45
+ "extensions": {
46
+ "clientLibrary": {
47
+ "name": "@apollo/client",
48
+ "version": "4.0.0"
49
+ }
50
+ }
51
+ }
52
+ ```
53
+
54
+ This feature can be disabled by passing `enhancedClientAwareness: { transport: false }` to your
55
+ `ApolloClient`, `HttpLink` or `BatchHttpLink` constructor options.
56
+
57
+ ### Minor Changes
58
+
59
+ - [#12698](https://github.com/apollographql/apollo-client/pull/12698) [`be77d1a`](https://github.com/apollographql/apollo-client/commit/be77d1a6ddf719cab4780a0679fcd98556ac7f22) Thanks [@phryneas](https://github.com/phryneas)! - Adjusted the accept header for multipart requests according to the new GraphQL over HTTP spec with these changes:
60
+
61
+ ```diff
62
+ -multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json
63
+ +multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/graphql-response+json,application/json;q=0.9
64
+ ```
65
+
66
+ ```diff
67
+ -multipart/mixed;deferSpec=20220824,application/json
68
+ +multipart/mixed;deferSpec=20220824,application/graphql-response+json,application/json;q=0.9
69
+ ```
70
+
71
+ - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Add the new `ClientAwarenessLink`.
72
+
73
+ This link is already included in `HttpLink` and `BatchHttpLink` to enable the
74
+ "client awareness" and "enhanced client awareness" features, but you can also use
75
+ `ClientAwarenessLink` directly in your link chain to combine it with other
76
+ terminating links.
77
+
78
+ If you want to save the bundle size that `ClientAwarenessLink` adds to `HttpLink`
79
+ and `BatchHttpLink`, you can use `BaseHttpLink` or `BaseBatchHttpLink` instead.
80
+ These links come without the `ClientAwarenessLink` included.
81
+
82
+ For example:
83
+
84
+ ```diff
85
+ import {
86
+ ApolloClient,
87
+ - HttpLink,
88
+ } from "@apollo/client";
89
+ +import { BaseHttpLink } from "@apollo/client/link/http";
90
+
91
+ const client = new ApolloClient({
92
+ - link: new HttpLink({
93
+ + link: new BaseHttpLink({
94
+ uri,
95
+ }),
96
+ cache: new InMemoryCache(),
97
+ });
98
+ ```
99
+
100
+ - [#12698](https://github.com/apollographql/apollo-client/pull/12698) [`be77d1a`](https://github.com/apollographql/apollo-client/commit/be77d1a6ddf719cab4780a0679fcd98556ac7f22) Thanks [@phryneas](https://github.com/phryneas)! - Adds an `accept` option to `HttpOptions` that allows to add additional `Accept` headers to be merged in without overriding user-specified or default accept headers.
101
+
102
+ ### Patch Changes
103
+
104
+ - [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Fixed a bug in `PersistedQueryLink` where the `persistedQuery` extension would still be sent after a `PersistedQueryNotSupported` if `includeExtensions` was enabled on `HttpLink`.
105
+
106
+ ## 4.0.0-alpha.21
107
+
108
+ ### Major Changes
109
+
110
+ - [#12686](https://github.com/apollographql/apollo-client/pull/12686) [`dc4b1d0`](https://github.com/apollographql/apollo-client/commit/dc4b1d0d2479a37067113b7bd161a550fb8e4df6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - A `@defer` query that has not yet finished streaming is now considered loading and thus the `loading` flag will be `true` until the response has completed. A new `NetworkStatus.streaming` value has been introduced and will be set as the `networkStatus` while the response is streaming.
111
+
112
+ - [#12685](https://github.com/apollographql/apollo-client/pull/12685) [`3b74800`](https://github.com/apollographql/apollo-client/commit/3b748003df89ec69a6ad045fb47bbe9c3e62104c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the check and warning for `cache.fragmentMatches` when applying data masking. `cache.fragmentMatches` is a required API and data masking may crash when `cache.fragmentMatches` does not exist.
113
+
114
+ - [#12684](https://github.com/apollographql/apollo-client/pull/12684) [`e697431`](https://github.com/apollographql/apollo-client/commit/e697431a9995fd1900e625c30a9065edd71111d9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `context` from `useLazyQuery` hook options. If used, `context` must now be provided to the `execute` function. `context` will reset to `{}` if not provided as an option to `execute`.
115
+
3
116
  ## 4.0.0-alpha.20
4
117
 
5
118
  ### Major Changes
@@ -94,7 +94,7 @@ class ApolloCache {
94
94
  if (environment_1.__DEV__) {
95
95
  const actualFragmentName = fragmentName || (0, internal_1.getFragmentDefinition)(fragment).name.value;
96
96
  if (!id) {
97
- __DEV__ && invariant_1.invariant.warn(109, actualFragmentName);
97
+ __DEV__ && invariant_1.invariant.warn(108, actualFragmentName);
98
98
  }
99
99
  }
100
100
  const diffOptions = {
@@ -82,7 +82,7 @@ class EntityStore {
82
82
  // then there are no fields to be merged, so we're done.
83
83
  if (!incoming)
84
84
  return;
85
- (0, invariant_1.invariant)(typeof dataId === "string", 95);
85
+ (0, invariant_1.invariant)(typeof dataId === "string", 94);
86
86
  const merged = new internal_1.DeepMerger(storeObjectReconciler).merge(existing, incoming);
87
87
  // Even if merged === existing, existing may have come from a lower
88
88
  // layer, so we always need to set this.data[dataId] on this level.
@@ -182,7 +182,7 @@ class EntityStore {
182
182
  if (environment_1.__DEV__) {
183
183
  const checkReference = (ref) => {
184
184
  if (this.lookup(ref.__ref) === undefined) {
185
- __DEV__ && invariant_1.invariant.warn(96, ref);
185
+ __DEV__ && invariant_1.invariant.warn(95, ref);
186
186
  return true;
187
187
  }
188
188
  };
@@ -211,7 +211,7 @@ class EntityStore {
211
211
  }
212
212
  }
213
213
  if (seenReference && someNonReference !== undefined) {
214
- __DEV__ && invariant_1.invariant.warn(97, someNonReference);
214
+ __DEV__ && invariant_1.invariant.warn(96, someNonReference);
215
215
  break;
216
216
  }
217
217
  }
@@ -41,7 +41,7 @@ function keyFieldsFnFromSpecifier(specifier) {
41
41
  // context.readField for this extraction.
42
42
  extracted = extractKeyPath(object, schemaKeyPath, extractKey);
43
43
  }
44
- (0, invariant_1.invariant)(extracted !== void 0, 98, schemaKeyPath.join("."), object);
44
+ (0, invariant_1.invariant)(extracted !== void 0, 97, schemaKeyPath.join("."), object);
45
45
  return extracted;
46
46
  }));
47
47
  return `${context.typename}:${JSON.stringify(keyObject)}`;
@@ -204,7 +204,7 @@ class Policies {
204
204
  const rootId = "ROOT_" + which.toUpperCase();
205
205
  const old = this.rootTypenamesById[rootId];
206
206
  if (typename !== old) {
207
- (0, invariant_1.invariant)(!old || old === which, 99, which);
207
+ (0, invariant_1.invariant)(!old || old === which, 98, which);
208
208
  // First, delete any old __typename associated with this rootId from
209
209
  // rootIdsByTypename.
210
210
  if (old)
@@ -349,7 +349,7 @@ class Policies {
349
349
  if (supertypeSet.has(supertype)) {
350
350
  if (!typenameSupertypeSet.has(supertype)) {
351
351
  if (checkingFuzzySubtypes) {
352
- __DEV__ && invariant_1.invariant.warn(100, typename, supertype);
352
+ __DEV__ && invariant_1.invariant.warn(99, typename, supertype);
353
353
  }
354
354
  // Record positive results for faster future lookup.
355
355
  // Unfortunately, we cannot safely cache negative results,
@@ -560,7 +560,7 @@ function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables)
560
560
  }
561
561
  }
562
562
  if (environment_1.__DEV__ && options.from === void 0) {
563
- __DEV__ && invariant_1.invariant.warn(101, (0, internal_1.stringifyForDisplay)(Array.from(readFieldArgs)));
563
+ __DEV__ && invariant_1.invariant.warn(100, (0, internal_1.stringifyForDisplay)(Array.from(readFieldArgs)));
564
564
  }
565
565
  if (void 0 === options.variables) {
566
566
  options.variables = variables;
@@ -570,7 +570,7 @@ function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables)
570
570
  function makeMergeObjectsFunction(store) {
571
571
  return function mergeObjects(existing, incoming) {
572
572
  if ((0, internal_1.isArray)(existing) || (0, internal_1.isArray)(incoming)) {
573
- throw (0, invariant_1.newInvariantError)(102);
573
+ throw (0, invariant_1.newInvariantError)(101);
574
574
  }
575
575
  // These dynamic checks are necessary because the parameters of a
576
576
  // custom merge function can easily have the any type, so the type