@apollo/client 4.0.0-alpha.3 → 4.0.0-alpha.5

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 (247) hide show
  1. package/.changeset/eighty-squids-fix.md +15 -0
  2. package/.changeset/eleven-kangaroos-jump.md +5 -0
  3. package/.changeset/forty-shrimps-fry.md +5 -0
  4. package/.changeset/funny-jeans-invent.md +16 -0
  5. package/.changeset/grumpy-vans-type.md +5 -0
  6. package/.changeset/khaki-spies-work.md +11 -0
  7. package/.changeset/light-apes-rescue.md +5 -0
  8. package/.changeset/little-spoons-kick.md +7 -0
  9. package/.changeset/loud-cows-raise.md +7 -0
  10. package/.changeset/many-buses-allow.md +5 -0
  11. package/.changeset/odd-lemons-relax.md +5 -0
  12. package/.changeset/poor-eels-punch.md +5 -0
  13. package/.changeset/pre.json +18 -0
  14. package/.changeset/real-teachers-peel.md +5 -0
  15. package/.changeset/slimy-chicken-melt.md +5 -0
  16. package/.changeset/thick-books-grin.md +5 -0
  17. package/.changeset/tough-rockets-allow.md +5 -0
  18. package/.changeset/tricky-tables-shave.md +5 -0
  19. package/.changeset/warm-ties-sit.md +7 -0
  20. package/CHANGELOG.md +84 -0
  21. package/__cjs/cache/core/cache.cjs +1 -1
  22. package/__cjs/cache/inmemory/entityStore.cjs +3 -3
  23. package/__cjs/cache/inmemory/key-extractor.cjs +1 -1
  24. package/__cjs/cache/inmemory/policies.cjs +4 -4
  25. package/__cjs/cache/inmemory/readFromStore.cjs +2 -2
  26. package/__cjs/cache/inmemory/writeToStore.cjs +4 -4
  27. package/__cjs/core/ApolloClient.cjs +25 -16
  28. package/__cjs/core/ApolloClient.cjs.map +1 -1
  29. package/__cjs/core/ApolloClient.d.cts +17 -5
  30. package/__cjs/core/LocalState.cjs +2 -2
  31. package/__cjs/core/ObservableQuery.cjs +44 -22
  32. package/__cjs/core/ObservableQuery.cjs.map +1 -1
  33. package/__cjs/core/ObservableQuery.d.cts +6 -3
  34. package/__cjs/core/QueryManager.cjs +72 -35
  35. package/__cjs/core/QueryManager.cjs.map +1 -1
  36. package/__cjs/core/QueryManager.d.cts +14 -3
  37. package/__cjs/core/types.d.cts +32 -0
  38. package/__cjs/core/watchQueryOptions.d.cts +18 -25
  39. package/__cjs/invariantErrorCodes.cjs +57 -77
  40. package/__cjs/link/core/ApolloLink.cjs +2 -2
  41. package/__cjs/link/http/checkFetcher.cjs +1 -1
  42. package/__cjs/link/http/createHttpLink.cjs +1 -1
  43. package/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
  44. package/__cjs/link/http/serializeFetchParameter.cjs +1 -1
  45. package/__cjs/link/persisted-queries/index.cjs +2 -2
  46. package/__cjs/link/utils/validateOperation.cjs +1 -1
  47. package/__cjs/masking/maskDefinition.cjs +2 -2
  48. package/__cjs/masking/maskFragment.cjs +2 -2
  49. package/__cjs/masking/maskOperation.cjs +1 -1
  50. package/__cjs/masking/utils.cjs +1 -1
  51. package/__cjs/react/context/ApolloConsumer.cjs +1 -1
  52. package/__cjs/react/context/ApolloContext.cjs +1 -1
  53. package/__cjs/react/context/ApolloContext.cjs.map +1 -1
  54. package/__cjs/react/context/ApolloContext.d.cts +2 -2
  55. package/__cjs/react/context/ApolloProvider.cjs +1 -1
  56. package/__cjs/react/hooks/index.cjs +13 -8
  57. package/__cjs/react/hooks/index.cjs.map +1 -1
  58. package/__cjs/react/hooks/index.d.cts +6 -12
  59. package/__cjs/react/hooks/internal/wrapHook.cjs +26 -5
  60. package/__cjs/react/hooks/internal/wrapHook.cjs.map +1 -1
  61. package/__cjs/react/hooks/internal/wrapHook.d.cts +3 -1
  62. package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
  63. package/__cjs/react/hooks/useBackgroundQuery.d.cts +146 -43
  64. package/__cjs/react/hooks/useFragment.cjs.map +1 -1
  65. package/__cjs/react/hooks/useFragment.d.cts +51 -26
  66. package/__cjs/react/hooks/useLazyQuery.cjs +1 -1
  67. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  68. package/__cjs/react/hooks/useLazyQuery.d.cts +263 -262
  69. package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
  70. package/__cjs/react/hooks/useLoadableQuery.d.cts +105 -32
  71. package/__cjs/react/hooks/useMutation.cjs +14 -19
  72. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  73. package/__cjs/react/hooks/useMutation.d.cts +198 -3
  74. package/__cjs/react/hooks/useQuery.cjs +82 -189
  75. package/__cjs/react/hooks/useQuery.cjs.map +1 -1
  76. package/__cjs/react/hooks/useQuery.d.cts +283 -4
  77. package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
  78. package/__cjs/react/hooks/useQueryRefHandlers.d.cts +21 -20
  79. package/__cjs/react/hooks/useReadQuery.cjs.map +1 -1
  80. package/__cjs/react/hooks/useReadQuery.d.cts +26 -24
  81. package/__cjs/react/hooks/useSubscription.cjs +8 -57
  82. package/__cjs/react/hooks/useSubscription.cjs.map +1 -1
  83. package/__cjs/react/hooks/useSubscription.d.cts +96 -9
  84. package/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
  85. package/__cjs/react/hooks/useSuspenseFragment.d.cts +40 -37
  86. package/__cjs/react/hooks/useSuspenseQuery.cjs +2 -2
  87. package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
  88. package/__cjs/react/hooks/useSuspenseQuery.d.cts +202 -35
  89. package/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
  90. package/__cjs/react/index.cjs.map +1 -1
  91. package/__cjs/react/index.d.cts +2 -1
  92. package/__cjs/react/internal/index.cjs +3 -1
  93. package/__cjs/react/internal/index.cjs.map +1 -1
  94. package/__cjs/react/internal/index.d.cts +2 -0
  95. package/__cjs/react/internal/types.d.cts +46 -0
  96. package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
  97. package/__cjs/react/query-preloader/createQueryPreloader.d.cts +2 -3
  98. package/__cjs/react/ssr/getDataFromTree.cjs +43 -12
  99. package/__cjs/react/ssr/getDataFromTree.cjs.map +1 -1
  100. package/__cjs/react/ssr/getDataFromTree.d.cts +5 -0
  101. package/__cjs/react/ssr/index.cjs +1 -3
  102. package/__cjs/react/ssr/index.cjs.map +1 -1
  103. package/__cjs/react/ssr/index.d.cts +0 -1
  104. package/__cjs/react/ssr/useSSRQuery.cjs +60 -0
  105. package/__cjs/react/ssr/useSSRQuery.cjs.map +1 -0
  106. package/__cjs/react/ssr/useSSRQuery.d.cts +5 -0
  107. package/__cjs/react/types/deprecated.cjs +3 -0
  108. package/__cjs/react/types/deprecated.cjs.map +1 -0
  109. package/__cjs/react/types/deprecated.d.cts +65 -0
  110. package/__cjs/react/types/types.documentation.d.cts +4 -12
  111. package/__cjs/testing/matchers/index.cjs +4 -0
  112. package/__cjs/testing/matchers/index.cjs.map +1 -1
  113. package/__cjs/testing/matchers/toEmitStrictTyped.cjs +42 -0
  114. package/__cjs/testing/matchers/toEmitStrictTyped.cjs.map +1 -0
  115. package/__cjs/testing/matchers/toEmitStrictTyped.d.cts +7 -0
  116. package/__cjs/testing/matchers/toEqualLazyQueryResult.cjs.map +1 -1
  117. package/__cjs/testing/matchers/toEqualLazyQueryResult.d.cts +2 -2
  118. package/__cjs/testing/matchers/toEqualQueryResult.cjs.map +1 -1
  119. package/__cjs/testing/matchers/toEqualQueryResult.d.cts +2 -2
  120. package/__cjs/testing/matchers/toEqualStrictTyped.cjs +26 -0
  121. package/__cjs/testing/matchers/toEqualStrictTyped.cjs.map +1 -0
  122. package/__cjs/testing/matchers/toEqualStrictTyped.d.cts +3 -0
  123. package/__cjs/testing/matchers/utils/getSerializableProperties.cjs +23 -0
  124. package/__cjs/testing/matchers/utils/getSerializableProperties.cjs.map +1 -0
  125. package/__cjs/testing/matchers/utils/getSerializableProperties.d.cts +2 -0
  126. package/__cjs/version.cjs +1 -1
  127. package/__cjs/version.d.cts +1 -1
  128. package/cache/core/cache.js +1 -1
  129. package/cache/inmemory/entityStore.js +3 -3
  130. package/cache/inmemory/key-extractor.js +1 -1
  131. package/cache/inmemory/policies.js +4 -4
  132. package/cache/inmemory/readFromStore.js +2 -2
  133. package/cache/inmemory/writeToStore.js +4 -4
  134. package/core/ApolloClient.d.ts +17 -5
  135. package/core/ApolloClient.js +25 -16
  136. package/core/ApolloClient.js.map +1 -1
  137. package/core/LocalState.js +2 -2
  138. package/core/ObservableQuery.d.ts +6 -3
  139. package/core/ObservableQuery.js +44 -22
  140. package/core/ObservableQuery.js.map +1 -1
  141. package/core/QueryManager.d.ts +14 -3
  142. package/core/QueryManager.js +73 -36
  143. package/core/QueryManager.js.map +1 -1
  144. package/core/types.d.ts +32 -0
  145. package/core/watchQueryOptions.d.ts +18 -25
  146. package/invariantErrorCodes.js +57 -77
  147. package/link/core/ApolloLink.js +2 -2
  148. package/link/http/checkFetcher.js +1 -1
  149. package/link/http/createHttpLink.js +1 -1
  150. package/link/http/parseAndCheckHttpResponse.js +1 -1
  151. package/link/http/serializeFetchParameter.js +1 -1
  152. package/link/persisted-queries/index.js +2 -2
  153. package/link/utils/validateOperation.js +1 -1
  154. package/masking/maskDefinition.js +2 -2
  155. package/masking/maskFragment.js +2 -2
  156. package/masking/maskOperation.js +1 -1
  157. package/masking/utils.js +1 -1
  158. package/package.json +1 -1
  159. package/react/context/ApolloConsumer.js +1 -1
  160. package/react/context/ApolloContext.d.ts +2 -2
  161. package/react/context/ApolloContext.js +1 -1
  162. package/react/context/ApolloContext.js.map +1 -1
  163. package/react/context/ApolloProvider.js +1 -1
  164. package/react/hooks/index.d.ts +6 -12
  165. package/react/hooks/index.js +6 -6
  166. package/react/hooks/index.js.map +1 -1
  167. package/react/hooks/internal/wrapHook.d.ts +3 -1
  168. package/react/hooks/internal/wrapHook.js +24 -5
  169. package/react/hooks/internal/wrapHook.js.map +1 -1
  170. package/react/hooks/useBackgroundQuery.d.ts +146 -43
  171. package/react/hooks/useBackgroundQuery.js.map +1 -1
  172. package/react/hooks/useFragment.d.ts +51 -26
  173. package/react/hooks/useFragment.js.map +1 -1
  174. package/react/hooks/useLazyQuery.d.ts +263 -262
  175. package/react/hooks/useLazyQuery.js +1 -1
  176. package/react/hooks/useLazyQuery.js.map +1 -1
  177. package/react/hooks/useLoadableQuery.d.ts +105 -32
  178. package/react/hooks/useLoadableQuery.js.map +1 -1
  179. package/react/hooks/useMutation.d.ts +198 -3
  180. package/react/hooks/useMutation.js +14 -19
  181. package/react/hooks/useMutation.js.map +1 -1
  182. package/react/hooks/useQuery.d.ts +283 -4
  183. package/react/hooks/useQuery.js +83 -190
  184. package/react/hooks/useQuery.js.map +1 -1
  185. package/react/hooks/useQueryRefHandlers.d.ts +21 -20
  186. package/react/hooks/useQueryRefHandlers.js.map +1 -1
  187. package/react/hooks/useReadQuery.d.ts +26 -24
  188. package/react/hooks/useReadQuery.js.map +1 -1
  189. package/react/hooks/useSubscription.d.ts +96 -9
  190. package/react/hooks/useSubscription.js +7 -53
  191. package/react/hooks/useSubscription.js.map +1 -1
  192. package/react/hooks/useSuspenseFragment.d.ts +40 -37
  193. package/react/hooks/useSuspenseFragment.js.map +1 -1
  194. package/react/hooks/useSuspenseQuery.d.ts +202 -35
  195. package/react/hooks/useSuspenseQuery.js +2 -2
  196. package/react/hooks/useSuspenseQuery.js.map +1 -1
  197. package/react/hooks/useSyncExternalStore.js +1 -1
  198. package/react/index.d.ts +2 -1
  199. package/react/index.js.map +1 -1
  200. package/react/internal/index.d.ts +2 -0
  201. package/react/internal/index.js +2 -1
  202. package/react/internal/index.js.map +1 -1
  203. package/react/internal/types.d.ts +46 -0
  204. package/react/query-preloader/createQueryPreloader.d.ts +2 -3
  205. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  206. package/react/ssr/getDataFromTree.d.ts +5 -0
  207. package/react/ssr/getDataFromTree.js +43 -12
  208. package/react/ssr/getDataFromTree.js.map +1 -1
  209. package/react/ssr/index.d.ts +0 -1
  210. package/react/ssr/index.js +0 -1
  211. package/react/ssr/index.js.map +1 -1
  212. package/react/ssr/useSSRQuery.d.ts +5 -0
  213. package/react/ssr/useSSRQuery.js +56 -0
  214. package/react/ssr/useSSRQuery.js.map +1 -0
  215. package/react/types/deprecated.d.ts +65 -0
  216. package/react/types/deprecated.js +2 -0
  217. package/react/types/deprecated.js.map +1 -0
  218. package/react/types/types.documentation.d.ts +4 -12
  219. package/testing/matchers/index.js +4 -0
  220. package/testing/matchers/index.js.map +1 -1
  221. package/testing/matchers/toEmitStrictTyped.d.ts +7 -0
  222. package/testing/matchers/toEmitStrictTyped.js +38 -0
  223. package/testing/matchers/toEmitStrictTyped.js.map +1 -0
  224. package/testing/matchers/toEqualLazyQueryResult.d.ts +2 -2
  225. package/testing/matchers/toEqualLazyQueryResult.js.map +1 -1
  226. package/testing/matchers/toEqualQueryResult.d.ts +2 -2
  227. package/testing/matchers/toEqualQueryResult.js.map +1 -1
  228. package/testing/matchers/toEqualStrictTyped.d.ts +3 -0
  229. package/testing/matchers/toEqualStrictTyped.js +22 -0
  230. package/testing/matchers/toEqualStrictTyped.js.map +1 -0
  231. package/testing/matchers/utils/getSerializableProperties.d.ts +2 -0
  232. package/testing/matchers/utils/getSerializableProperties.js +20 -0
  233. package/testing/matchers/utils/getSerializableProperties.js.map +1 -0
  234. package/version.d.ts +1 -1
  235. package/version.js +1 -1
  236. package/__cjs/react/ssr/RenderPromises.cjs +0 -104
  237. package/__cjs/react/ssr/RenderPromises.cjs.map +0 -1
  238. package/__cjs/react/ssr/RenderPromises.d.cts +0 -22
  239. package/__cjs/react/types/types.d.cts +0 -661
  240. package/react/ssr/RenderPromises.d.ts +0 -22
  241. package/react/ssr/RenderPromises.js +0 -100
  242. package/react/ssr/RenderPromises.js.map +0 -1
  243. package/react/types/types.d.ts +0 -661
  244. /package/__cjs/react/{types → internal}/types.cjs +0 -0
  245. /package/__cjs/react/{types → internal}/types.cjs.map +0 -0
  246. /package/react/{types → internal}/types.js +0 -0
  247. /package/react/{types → internal}/types.js.map +0 -0
@@ -0,0 +1,15 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ `ObservableQuery.setOptions` has been removed as it was an alias of `reobserve`. Prefer using `reobserve` directly instead.
6
+
7
+ ```diff
8
+ const observable = client.watchQuery(options);
9
+
10
+ // Use reobserve to set new options and reevaluate the query
11
+ - observable.setOptions(newOptions);
12
+ + observable.reobserve(newOptions);
13
+ ```
14
+
15
+ As a result of this change, `reobserve` has been marked for public use and is no longer considered an internal API. The `newNetworkStatus` argument has been removed to facilitate this change.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ Remove `variables` from the result returned from `useSubscription`.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ Subscriptions now emit a `SubscribeResult` instead of a `FetchResult`. As a result, the `errors` field has been removed in favor of `error`.
@@ -0,0 +1,16 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ `ssrMode`, `ssrForceFetchDelay` and `disableNetworkFetches` have been reworked:
6
+
7
+ Previously, a `ObservableQuery` created by `client.query` or `client.watchQuery`
8
+ while one of those were active would permanently be changed from a `fetchPolicy`
9
+ of `"network-only"` or `"cache-and-network"` to `"cache-first"`, and stay that way
10
+ even long after `disableNetworkFetches` would have been deactivated.
11
+
12
+ Now, the `ObservableQuery` will keep their original `fetchPolicy`, but queries
13
+ made during `disableNetworkFetches` will just apply the `fetchPolicy` replacement
14
+ at request time, just for that one request.
15
+
16
+ `ApolloClient.disableNetworkFetches` has been renamed to `ApolloClient.prioritizeCacheValues` to better reflect this behaviour.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ Unify error behavior on mutations for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors created when using an `errorPolicy` of `all` will now resolve the promise and be returned on the `error` property of the result, or stripped away when the `errorPolicy` is `none`.
@@ -0,0 +1,11 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ Flatten out React hook types. As a result, the base types have been removed. Prefer using the hook types instead. Removed types include:
6
+ - `BaseMutationOptions`
7
+ - `BaseQueryOptions`
8
+ - `BaseSubscriptionOptions`
9
+ - `ObservableQueryFields`
10
+ - `MutationSharedOptions`
11
+ - `QueryFunctionOptions`
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ `useQuery` no longer returns `reobserve` as part of its result. It was possible to use `reobserve` to set new options on the underlying `ObservableQuery` instance which differed from the options passed to the hook. This could result in unexpected results. Instead prefer to rerender the hook with new options.
@@ -0,0 +1,7 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ `client.mutate` now returns a `MutateResult` instead of `FetchResult`. As a result, the `errors` property has been removed in favor of `error` which is set if either a network error occured or GraphQL errors are returned from the server.
6
+
7
+ `useMutation` now also returns a `MutateResult` instead of a `FetchResult`.
@@ -0,0 +1,7 @@
1
+ ---
2
+ "@apollo/client": patch
3
+ ---
4
+
5
+ `useQuery` with `ssr: false` - previously, `skip` had a higher priortity than `ssr: false` while `ssr: false` had a higher priority than `fetchPolicy: "standby"` (which is roughly equivalent to `skip`).
6
+
7
+ This priority has been adjusted so now both `skip` and `fetchPolicy: "standby"` have a higher priority than `ssr: false` and will return `loading: false`, while `ssr: false` will only come after those and will return `loading: true` if those are not set.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": patch
3
+ ---
4
+
5
+ Fix an issue where passing `onError` to `useMutation` would resolve the promise returned by the `mutate` function instead of rejecting when using an `errorPolicy` of `none`.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": patch
3
+ ---
4
+
5
+ Rename all React hook result types and options. These types have all moved under a namespace that matches the hook name. For example, `useQuery` exports `useQuery.Options` and `useQuery.Result` types. As such, the old hook types have been deprecated and will be removed in v5.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ Mutations no longer report errors if the GraphQL result from the server contains an empty array of errors.
@@ -16,23 +16,33 @@
16
16
  "cuddly-spiders-tie",
17
17
  "curvy-pianos-count",
18
18
  "dirty-trees-pump",
19
+ "eighty-squids-fix",
20
+ "eleven-kangaroos-jump",
19
21
  "empty-rabbits-move",
20
22
  "fluffy-shoes-applaud",
21
23
  "forty-hairs-occur",
24
+ "forty-shrimps-fry",
22
25
  "four-ghosts-watch",
23
26
  "fresh-moose-hope",
27
+ "funny-jeans-invent",
24
28
  "good-dolphins-peel",
25
29
  "gorgeous-chefs-tap",
30
+ "grumpy-vans-type",
26
31
  "healthy-apes-sneeze",
27
32
  "hip-vans-act",
28
33
  "hot-cycles-notice",
29
34
  "itchy-drinks-refuse",
30
35
  "itchy-roses-accept",
36
+ "khaki-spies-work",
31
37
  "kind-fishes-develop",
32
38
  "late-trainers-peel",
39
+ "light-apes-rescue",
33
40
  "light-dolphins-taste",
34
41
  "light-sloths-end",
42
+ "little-spoons-kick",
43
+ "loud-cows-raise",
35
44
  "lucky-hats-push",
45
+ "many-buses-allow",
36
46
  "many-papayas-hide",
37
47
  "metal-needles-search",
38
48
  "mighty-penguins-wink",
@@ -41,11 +51,14 @@
41
51
  "nervous-goats-allow",
42
52
  "nice-donkeys-reflect",
43
53
  "nice-waves-work",
54
+ "odd-lemons-relax",
44
55
  "polite-bees-care",
56
+ "poor-eels-punch",
45
57
  "popular-games-sleep",
46
58
  "purple-lions-cough",
47
59
  "rare-houses-prove",
48
60
  "real-gorillas-move",
61
+ "real-teachers-peel",
49
62
  "rich-eagles-cross",
50
63
  "rich-kids-carry",
51
64
  "rude-fans-study",
@@ -53,6 +66,7 @@
53
66
  "shiny-carrots-invent",
54
67
  "short-jokes-jam",
55
68
  "silly-knives-exist",
69
+ "slimy-chicken-melt",
56
70
  "slimy-maps-press",
57
71
  "slow-ravens-explain",
58
72
  "small-buttons-rhyme",
@@ -67,12 +81,16 @@
67
81
  "tall-bikes-develop",
68
82
  "tall-cups-suffer",
69
83
  "tame-doors-shop",
84
+ "thick-books-grin",
70
85
  "tidy-squids-poke",
86
+ "tough-rockets-allow",
71
87
  "tough-taxis-smoke",
72
88
  "tough-tips-drop",
89
+ "tricky-tables-shave",
73
90
  "twenty-snakes-sort",
74
91
  "unlucky-kiwis-sell",
75
92
  "unlucky-sheep-change",
93
+ "warm-ties-sit",
76
94
  "yellow-cats-judge",
77
95
  "young-phones-fold",
78
96
  "young-turtles-explode"
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ Unify error behavior on subscriptions for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors that terminate the connection will now be emitted on the `error` property passed to the `next` callback followed by a call to the `complete` callback.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ Remove deprecated `onSubscriptionData` and `onSubscriptionComplete` callbacks from `useSubscription`. Use `onData` and `onComplete` instead.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": minor
3
+ ---
4
+
5
+ Split out SSR-specific code from useQuery hook, remove RenderPromises
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": patch
3
+ ---
4
+
5
+ Fix an issue where additional response properties were returned on the result returned from `client.mutate`, such as `@defer` payload fields. These properties are now stripped out to correspond to the TypeScript type.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ GraphQL errors or network errors emitted while using an `errorPolicy` of `ignore` in subscriptions will no longer emit a result if there is no `data` emitted along with the error.
@@ -0,0 +1,7 @@
1
+ ---
2
+ "@apollo/client": major
3
+ ---
4
+
5
+ Subscriptions no longer emit errors in the `error` callback and instead provide errors on the `error` property on the result passed to the `next` callback. As a result, errors will no longer automatically terminate the connection allowing additional results to be emitted when the connection stays open.
6
+
7
+ When an error terminates the downstream connection, a `next` event will be emitted with an `error` property followed by a `complete` event instead.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,89 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 4.0.0-alpha.5
4
+
5
+ ### Major Changes
6
+
7
+ - [#12478](https://github.com/apollographql/apollo-client/pull/12478) [`5ea6a45`](https://github.com/apollographql/apollo-client/commit/5ea6a45b3ec2f0d526abe78ae03c42bb519f87c7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `variables` from the result returned from `useSubscription`.
8
+
9
+ - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions now emit a `SubscribeResult` instead of a `FetchResult`. As a result, the `errors` field has been removed in favor of `error`.
10
+
11
+ - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unify error behavior on mutations for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors created when using an `errorPolicy` of `all` will now resolve the promise and be returned on the `error` property of the result, or stripped away when the `errorPolicy` is `none`.
12
+
13
+ - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.mutate` now returns a `MutateResult` instead of `FetchResult`. As a result, the `errors` property has been removed in favor of `error` which is set if either a network error occured or GraphQL errors are returned from the server.
14
+
15
+ `useMutation` now also returns a `MutateResult` instead of a `FetchResult`.
16
+
17
+ - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Mutations no longer report errors if the GraphQL result from the server contains an empty array of errors.
18
+
19
+ - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unify error behavior on subscriptions for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors that terminate the connection will now be emitted on the `error` property passed to the `next` callback followed by a call to the `complete` callback.
20
+
21
+ - [#12478](https://github.com/apollographql/apollo-client/pull/12478) [`5ea6a45`](https://github.com/apollographql/apollo-client/commit/5ea6a45b3ec2f0d526abe78ae03c42bb519f87c7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `onSubscriptionData` and `onSubscriptionComplete` callbacks from `useSubscription`. Use `onData` and `onComplete` instead.
22
+
23
+ - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - GraphQL errors or network errors emitted while using an `errorPolicy` of `ignore` in subscriptions will no longer emit a result if there is no `data` emitted along with the error.
24
+
25
+ - [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions no longer emit errors in the `error` callback and instead provide errors on the `error` property on the result passed to the `next` callback. As a result, errors will no longer automatically terminate the connection allowing additional results to be emitted when the connection stays open.
26
+
27
+ When an error terminates the downstream connection, a `next` event will be emitted with an `error` property followed by a `complete` event instead.
28
+
29
+ ### Minor Changes
30
+
31
+ - [#12487](https://github.com/apollographql/apollo-client/pull/12487) [`b695e5e`](https://github.com/apollographql/apollo-client/commit/b695e5e10ab0eb47948e914b610f67c40267349e) Thanks [@phryneas](https://github.com/phryneas)! - Split out SSR-specific code from useQuery hook, remove RenderPromises
32
+
33
+ ### Patch Changes
34
+
35
+ - [#12487](https://github.com/apollographql/apollo-client/pull/12487) [`b695e5e`](https://github.com/apollographql/apollo-client/commit/b695e5e10ab0eb47948e914b610f67c40267349e) Thanks [@phryneas](https://github.com/phryneas)! - `useQuery` with `ssr: false` - previously, `skip` had a higher priortity than `ssr: false` while `ssr: false` had a higher priority than `fetchPolicy: "standby"` (which is roughly equivalent to `skip`).
36
+
37
+ This priority has been adjusted so now both `skip` and `fetchPolicy: "standby"` have a higher priority than `ssr: false` and will return `loading: false`, while `ssr: false` will only come after those and will return `loading: true` if those are not set.
38
+
39
+ - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where passing `onError` to `useMutation` would resolve the promise returned by the `mutate` function instead of rejecting when using an `errorPolicy` of `none`.
40
+
41
+ - [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where additional response properties were returned on the result returned from `client.mutate`, such as `@defer` payload fields. These properties are now stripped out to correspond to the TypeScript type.
42
+
43
+ ## 4.0.0-alpha.4
44
+
45
+ ### Major Changes
46
+
47
+ - [#12463](https://github.com/apollographql/apollo-client/pull/12463) [`3868df8`](https://github.com/apollographql/apollo-client/commit/3868df81f973dc7b5a79fadf4dc1b0e291003b7f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.setOptions` has been removed as it was an alias of `reobserve`. Prefer using `reobserve` directly instead.
48
+
49
+ ```diff
50
+ const observable = client.watchQuery(options);
51
+
52
+ // Use reobserve to set new options and reevaluate the query
53
+ - observable.setOptions(newOptions);
54
+ + observable.reobserve(newOptions);
55
+ ```
56
+
57
+ As a result of this change, `reobserve` has been marked for public use and is no longer considered an internal API. The `newNetworkStatus` argument has been removed to facilitate this change.
58
+
59
+ - [#12470](https://github.com/apollographql/apollo-client/pull/12470) [`d32902f`](https://github.com/apollographql/apollo-client/commit/d32902f26a4c5dea30421ee52aeea52df3e5334e) Thanks [@phryneas](https://github.com/phryneas)! - `ssrMode`, `ssrForceFetchDelay` and `disableNetworkFetches` have been reworked:
60
+
61
+ Previously, a `ObservableQuery` created by `client.query` or `client.watchQuery`
62
+ while one of those were active would permanently be changed from a `fetchPolicy`
63
+ of `"network-only"` or `"cache-and-network"` to `"cache-first"`, and stay that way
64
+ even long after `disableNetworkFetches` would have been deactivated.
65
+
66
+ Now, the `ObservableQuery` will keep their original `fetchPolicy`, but queries
67
+ made during `disableNetworkFetches` will just apply the `fetchPolicy` replacement
68
+ at request time, just for that one request.
69
+
70
+ `ApolloClient.disableNetworkFetches` has been renamed to `ApolloClient.prioritizeCacheValues` to better reflect this behaviour.
71
+
72
+ - [#12465](https://github.com/apollographql/apollo-client/pull/12465) [`a132163`](https://github.com/apollographql/apollo-client/commit/a1321637cafb4023d6df416e9467294114d8346b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Flatten out React hook types. As a result, the base types have been removed. Prefer using the hook types instead. Removed types include:
73
+
74
+ - `BaseMutationOptions`
75
+ - `BaseQueryOptions`
76
+ - `BaseSubscriptionOptions`
77
+ - `ObservableQueryFields`
78
+ - `MutationSharedOptions`
79
+ - `QueryFunctionOptions`
80
+
81
+ - [#12463](https://github.com/apollographql/apollo-client/pull/12463) [`3868df8`](https://github.com/apollographql/apollo-client/commit/3868df81f973dc7b5a79fadf4dc1b0e291003b7f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useQuery` no longer returns `reobserve` as part of its result. It was possible to use `reobserve` to set new options on the underlying `ObservableQuery` instance which differed from the options passed to the hook. This could result in unexpected results. Instead prefer to rerender the hook with new options.
82
+
83
+ ### Patch Changes
84
+
85
+ - [#12465](https://github.com/apollographql/apollo-client/pull/12465) [`a132163`](https://github.com/apollographql/apollo-client/commit/a1321637cafb4023d6df416e9467294114d8346b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Rename all React hook result types and options. These types have all moved under a namespace that matches the hook name. For example, `useQuery` exports `useQuery.Options` and `useQuery.Result` types. As such, the old hook types have been deprecated and will be removed in v5.
86
+
3
87
  ## 4.0.0-alpha.3
4
88
 
5
89
  ### Major Changes
@@ -94,7 +94,7 @@ class ApolloCache {
94
94
  if (environment_1.__DEV__) {
95
95
  const actualFragmentName = fragmentName || (0, utilities_1.getFragmentDefinition)(fragment).name.value;
96
96
  if (!id) {
97
- __DEV__ && invariant_1.invariant.warn(97, actualFragmentName);
97
+ __DEV__ && invariant_1.invariant.warn(93, actualFragmentName);
98
98
  }
99
99
  }
100
100
  const diffOptions = {
@@ -81,7 +81,7 @@ class EntityStore {
81
81
  // then there are no fields to be merged, so we're done.
82
82
  if (!incoming)
83
83
  return;
84
- (0, invariant_1.invariant)(typeof dataId === "string", 83);
84
+ (0, invariant_1.invariant)(typeof dataId === "string", 79);
85
85
  const merged = new utilities_1.DeepMerger(storeObjectReconciler).merge(existing, incoming);
86
86
  // Even if merged === existing, existing may have come from a lower
87
87
  // layer, so we always need to set this.data[dataId] on this level.
@@ -181,7 +181,7 @@ class EntityStore {
181
181
  if (environment_1.__DEV__) {
182
182
  const checkReference = (ref) => {
183
183
  if (this.lookup(ref.__ref) === undefined) {
184
- __DEV__ && invariant_1.invariant.warn(84, ref);
184
+ __DEV__ && invariant_1.invariant.warn(80, ref);
185
185
  return true;
186
186
  }
187
187
  };
@@ -210,7 +210,7 @@ class EntityStore {
210
210
  }
211
211
  }
212
212
  if (seenReference && someNonReference !== undefined) {
213
- __DEV__ && invariant_1.invariant.warn(85, someNonReference);
213
+ __DEV__ && invariant_1.invariant.warn(81, someNonReference);
214
214
  break;
215
215
  }
216
216
  }
@@ -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, 86, schemaKeyPath.join("."), object);
44
+ (0, invariant_1.invariant)(extracted !== void 0, 82, schemaKeyPath.join("."), object);
45
45
  return extracted;
46
46
  }));
47
47
  return `${context.typename}:${JSON.stringify(keyObject)}`;
@@ -203,7 +203,7 @@ class Policies {
203
203
  const rootId = "ROOT_" + which.toUpperCase();
204
204
  const old = this.rootTypenamesById[rootId];
205
205
  if (typename !== old) {
206
- (0, invariant_1.invariant)(!old || old === which, 87, which);
206
+ (0, invariant_1.invariant)(!old || old === which, 83, which);
207
207
  // First, delete any old __typename associated with this rootId from
208
208
  // rootIdsByTypename.
209
209
  if (old)
@@ -348,7 +348,7 @@ class Policies {
348
348
  if (supertypeSet.has(supertype)) {
349
349
  if (!typenameSupertypeSet.has(supertype)) {
350
350
  if (checkingFuzzySubtypes) {
351
- __DEV__ && invariant_1.invariant.warn(88, typename, supertype);
351
+ __DEV__ && invariant_1.invariant.warn(84, typename, supertype);
352
352
  }
353
353
  // Record positive results for faster future lookup.
354
354
  // Unfortunately, we cannot safely cache negative results,
@@ -559,7 +559,7 @@ function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables)
559
559
  }
560
560
  }
561
561
  if (environment_1.__DEV__ && options.from === void 0) {
562
- __DEV__ && invariant_1.invariant.warn(89, (0, utilities_1.stringifyForDisplay)(Array.from(readFieldArgs)));
562
+ __DEV__ && invariant_1.invariant.warn(85, (0, utilities_1.stringifyForDisplay)(Array.from(readFieldArgs)));
563
563
  }
564
564
  if (void 0 === options.variables) {
565
565
  options.variables = variables;
@@ -569,7 +569,7 @@ function normalizeReadFieldOptions(readFieldArgs, objectOrReference, variables)
569
569
  function makeMergeObjectsFunction(store) {
570
570
  return function mergeObjects(existing, incoming) {
571
571
  if ((0, helpers_js_1.isArray)(existing) || (0, helpers_js_1.isArray)(incoming)) {
572
- throw (0, invariant_1.newInvariantError)(90);
572
+ throw (0, invariant_1.newInvariantError)(86);
573
573
  }
574
574
  // These dynamic checks are necessary because the parameters of a
575
575
  // custom merge function can easily have the any type, so the type
@@ -197,7 +197,7 @@ class StoreReader {
197
197
  else {
198
198
  const fragment = (0, utilities_1.getFragmentFromSelection)(selection, context.lookupFragment);
199
199
  if (!fragment && selection.kind === graphql_1.Kind.FRAGMENT_SPREAD) {
200
- throw (0, invariant_1.newInvariantError)(91, selection.name.value);
200
+ throw (0, invariant_1.newInvariantError)(87, selection.name.value);
201
201
  }
202
202
  if (fragment && policies.fragmentMatches(fragment, typename)) {
203
203
  fragment.selectionSet.selections.forEach(workSet.add, workSet);
@@ -281,7 +281,7 @@ function assertSelectionSetForIdValue(store, field, fieldValue) {
281
281
  if ((0, utilities_1.isNonNullObject)(value)) {
282
282
  (0, invariant_1.invariant)(
283
283
  !(0, utilities_1.isReference)(value),
284
- 92,
284
+ 88,
285
285
  (0, helpers_js_1.getTypenameFromStoreObject)(store, value),
286
286
  field.name.value
287
287
  );
@@ -72,7 +72,7 @@ class StoreWriter {
72
72
  context,
73
73
  });
74
74
  if (!(0, utilities_1.isReference)(ref)) {
75
- throw (0, invariant_1.newInvariantError)(93, result);
75
+ throw (0, invariant_1.newInvariantError)(89, result);
76
76
  }
77
77
  // So far, the store has not been modified, so now it's time to process
78
78
  // context.incomingById and merge those incoming fields into context.store.
@@ -222,7 +222,7 @@ class StoreWriter {
222
222
  // provide a default value, so its absence from the written data should
223
223
  // not be cause for alarm.
224
224
  !policies.getReadFunction(typename, field.name.value)) {
225
- __DEV__ && invariant_1.invariant.error(94, (0, utilities_1.resultKeyNameFromField)(field), result);
225
+ __DEV__ && invariant_1.invariant.error(90, (0, utilities_1.resultKeyNameFromField)(field), result);
226
226
  }
227
227
  });
228
228
  // Identify the result object, even if dataId was already provided,
@@ -369,7 +369,7 @@ class StoreWriter {
369
369
  else {
370
370
  const fragment = (0, utilities_1.getFragmentFromSelection)(selection, context.lookupFragment);
371
371
  if (!fragment && selection.kind === graphql_1.Kind.FRAGMENT_SPREAD) {
372
- throw (0, invariant_1.newInvariantError)(95, selection.name.value);
372
+ throw (0, invariant_1.newInvariantError)(91, selection.name.value);
373
373
  }
374
374
  if (fragment &&
375
375
  policies.fragmentMatches(fragment, typename, result, context.variables)) {
@@ -542,7 +542,7 @@ function warnAboutDataLoss(existingRef, incomingObj, storeFieldName, store) {
542
542
  }
543
543
  });
544
544
  }
545
- __DEV__ && invariant_1.invariant.warn(96, fieldName, parentType, childTypenames.length ?
545
+ __DEV__ && invariant_1.invariant.warn(92, fieldName, parentType, childTypenames.length ?
546
546
  "either ensure all objects of type " +
547
547
  childTypenames.join(" and ") +
548
548
  " have an ID or a custom merge function, or "
@@ -26,7 +26,23 @@ let hasSuggestedDevtools = false;
26
26
  class ApolloClient {
27
27
  link;
28
28
  cache;
29
+ /**
30
+ * @deprecated `disableNetworkFetches` has been renamed to `prioritizeCacheValues`.
31
+ */
29
32
  disableNetworkFetches;
33
+ set prioritizeCacheValues(value) {
34
+ this.queryManager.prioritizeCacheValues = value;
35
+ }
36
+ /**
37
+ * Whether to prioritize cache values over network results when `query` or `watchQuery` is called.
38
+ * This will essentially turn a `"network-only"` or `"cache-and-network"` fetchPolicy into a `"cache-first"` fetchPolicy,
39
+ * but without influencing the `fetchPolicy` of the created `ObservableQuery` long-term.
40
+ *
41
+ * This can e.g. be used to prioritize the cache during the first render after SSR.
42
+ */
43
+ get prioritizeCacheValues() {
44
+ return this.queryManager.prioritizeCacheValues;
45
+ }
30
46
  version;
31
47
  queryDeduplication;
32
48
  defaultOptions;
@@ -65,7 +81,7 @@ class ApolloClient {
65
81
  */
66
82
  constructor(options) {
67
83
  if (!options.cache) {
68
- throw (0, invariant_1.newInvariantError)(62);
84
+ throw (0, invariant_1.newInvariantError)(58);
69
85
  }
70
86
  const { uri, credentials, headers, cache, documentTransform, ssrMode = false, ssrForceFetchDelay = 0,
71
87
  // Expose the client instance as window.__APOLLO_CLIENT__ and call
@@ -79,7 +95,6 @@ class ApolloClient {
79
95
  }
80
96
  this.link = link;
81
97
  this.cache = cache;
82
- this.disableNetworkFetches = ssrMode || ssrForceFetchDelay > 0;
83
98
  this.queryDeduplication = queryDeduplication;
84
99
  this.defaultOptions = defaultOptions || {};
85
100
  this.typeDefs = typeDefs;
@@ -90,9 +105,6 @@ class ApolloClient {
90
105
  if (this.devtoolsConfig.enabled === undefined) {
91
106
  this.devtoolsConfig.enabled = environment_1.__DEV__;
92
107
  }
93
- if (ssrForceFetchDelay) {
94
- setTimeout(() => (this.disableNetworkFetches = false), ssrForceFetchDelay);
95
- }
96
108
  this.watchQuery = this.watchQuery.bind(this);
97
109
  this.query = this.query.bind(this);
98
110
  this.mutate = this.mutate.bind(this);
@@ -129,6 +141,12 @@ class ApolloClient {
129
141
  }
130
142
  : void 0,
131
143
  });
144
+ this.prioritizeCacheValues = ssrMode || ssrForceFetchDelay > 0;
145
+ if (ssrForceFetchDelay) {
146
+ setTimeout(() => {
147
+ this.prioritizeCacheValues = false;
148
+ }, ssrForceFetchDelay);
149
+ }
132
150
  if (this.devtoolsConfig.enabled)
133
151
  this.connectToDevTools();
134
152
  }
@@ -212,12 +230,6 @@ class ApolloClient {
212
230
  if (this.defaultOptions.watchQuery) {
213
231
  options = (0, utilities_1.mergeOptions)(this.defaultOptions.watchQuery, options);
214
232
  }
215
- // XXX Overwriting options is probably not the best way to do this long term...
216
- if (this.disableNetworkFetches &&
217
- (options.fetchPolicy === "network-only" ||
218
- options.fetchPolicy === "cache-and-network")) {
219
- options = { ...options, fetchPolicy: "cache-first" };
220
- }
221
233
  return this.queryManager.watchQuery(options);
222
234
  }
223
235
  /**
@@ -233,10 +245,7 @@ class ApolloClient {
233
245
  if (this.defaultOptions.query) {
234
246
  options = (0, utilities_1.mergeOptions)(this.defaultOptions.query, options);
235
247
  }
236
- (0, invariant_1.invariant)(options.fetchPolicy !== "cache-and-network", 63);
237
- if (this.disableNetworkFetches && options.fetchPolicy === "network-only") {
238
- options = { ...options, fetchPolicy: "cache-first" };
239
- }
248
+ (0, invariant_1.invariant)(options.fetchPolicy !== "cache-and-network", 59);
240
249
  return this.queryManager.query(options);
241
250
  }
242
251
  /**
@@ -456,7 +465,7 @@ class ApolloClient {
456
465
  // result.queries and result.results instead, you shouldn't have to worry
457
466
  // about preventing uncaught rejections for the Promise.all result.
458
467
  result.catch((error) => {
459
- __DEV__ && invariant_1.invariant.debug(64, error);
468
+ __DEV__ && invariant_1.invariant.debug(60, error);
460
469
  });
461
470
  return result;
462
471
  }