@apollo/client 4.0.0-rc.7 → 4.0.0-rc.9

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 (176) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/__cjs/cache/inmemory/writeToStore.cjs +1 -1
  3. package/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
  4. package/__cjs/core/ObservableQuery.cjs +1 -1
  5. package/__cjs/core/ObservableQuery.cjs.map +1 -1
  6. package/__cjs/core/QueryInfo.cjs +2 -6
  7. package/__cjs/core/QueryInfo.cjs.map +1 -1
  8. package/__cjs/core/index.cjs +1 -2
  9. package/__cjs/core/index.cjs.map +1 -1
  10. package/__cjs/core/index.d.cts +1 -2
  11. package/__cjs/invariantErrorCodes.cjs +9 -9
  12. package/__cjs/link/batch/batchLink.cjs +31 -5
  13. package/__cjs/link/batch/batchLink.cjs.map +1 -1
  14. package/__cjs/link/batch/batchLink.d.cts +102 -26
  15. package/__cjs/link/batch/batching.cjs.map +1 -1
  16. package/__cjs/link/batch/batching.d.cts +2 -2
  17. package/__cjs/link/batch/index.cjs +1 -2
  18. package/__cjs/link/batch/index.cjs.map +1 -1
  19. package/__cjs/link/batch/index.d.cts +1 -2
  20. package/__cjs/link/batch-http/BaseBatchHttpLink.cjs +156 -0
  21. package/__cjs/link/batch-http/BaseBatchHttpLink.cjs.map +1 -0
  22. package/__cjs/link/batch-http/BaseBatchHttpLink.d.cts +68 -0
  23. package/__cjs/link/batch-http/batchHttpLink.cjs +25 -130
  24. package/__cjs/link/batch-http/batchHttpLink.cjs.map +1 -1
  25. package/__cjs/link/batch-http/batchHttpLink.d.cts +40 -16
  26. package/__cjs/link/batch-http/index.cjs +2 -1
  27. package/__cjs/link/batch-http/index.cjs.map +1 -1
  28. package/__cjs/link/batch-http/index.d.cts +2 -1
  29. package/__cjs/link/client-awareness/ClientAwarenessLink.cjs +36 -3
  30. package/__cjs/link/client-awareness/ClientAwarenessLink.cjs.map +1 -1
  31. package/__cjs/link/client-awareness/ClientAwarenessLink.d.cts +55 -3
  32. package/__cjs/link/context/index.cjs +19 -0
  33. package/__cjs/link/context/index.cjs.map +1 -1
  34. package/__cjs/link/context/index.d.cts +64 -2
  35. package/__cjs/link/error/index.cjs +44 -0
  36. package/__cjs/link/error/index.cjs.map +1 -1
  37. package/__cjs/link/error/index.d.cts +64 -4
  38. package/__cjs/link/http/BaseHttpLink.cjs +60 -10
  39. package/__cjs/link/http/BaseHttpLink.cjs.map +1 -1
  40. package/__cjs/link/http/BaseHttpLink.d.cts +256 -2
  41. package/__cjs/link/http/HttpLink.cjs +23 -1
  42. package/__cjs/link/http/HttpLink.cjs.map +1 -1
  43. package/__cjs/link/http/HttpLink.d.cts +41 -141
  44. package/__cjs/link/http/checkFetcher.cjs +1 -1
  45. package/__cjs/link/http/index.cjs +1 -3
  46. package/__cjs/link/http/index.cjs.map +1 -1
  47. package/__cjs/link/http/index.d.cts +0 -2
  48. package/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
  49. package/__cjs/link/http/rewriteURIForGET.cjs +2 -3
  50. package/__cjs/link/http/rewriteURIForGET.cjs.map +1 -1
  51. package/__cjs/link/http/rewriteURIForGET.d.cts +2 -2
  52. package/__cjs/link/http/selectHttpOptionsAndBody.cjs.map +1 -1
  53. package/__cjs/link/http/selectHttpOptionsAndBody.d.cts +7 -7
  54. package/__cjs/link/persisted-queries/index.cjs +18 -2
  55. package/__cjs/link/persisted-queries/index.cjs.map +1 -1
  56. package/__cjs/link/persisted-queries/index.d.cts +204 -24
  57. package/__cjs/link/remove-typename/index.cjs.map +1 -1
  58. package/__cjs/link/remove-typename/index.d.cts +0 -1
  59. package/__cjs/link/remove-typename/removeTypenameFromVariables.cjs +48 -0
  60. package/__cjs/link/remove-typename/removeTypenameFromVariables.cjs.map +1 -1
  61. package/__cjs/link/remove-typename/removeTypenameFromVariables.d.cts +124 -8
  62. package/__cjs/link/retry/delayFunction.cjs.map +1 -1
  63. package/__cjs/link/retry/delayFunction.d.cts +2 -39
  64. package/__cjs/link/retry/retryFunction.cjs.map +1 -1
  65. package/__cjs/link/retry/retryFunction.d.cts +2 -29
  66. package/__cjs/link/retry/retryLink.cjs +35 -10
  67. package/__cjs/link/retry/retryLink.cjs.map +1 -1
  68. package/__cjs/link/retry/retryLink.d.cts +129 -4
  69. package/__cjs/link/schema/index.cjs +20 -0
  70. package/__cjs/link/schema/index.cjs.map +1 -1
  71. package/__cjs/link/schema/index.d.cts +129 -7
  72. package/__cjs/link/subscriptions/index.cjs +23 -0
  73. package/__cjs/link/subscriptions/index.cjs.map +1 -1
  74. package/__cjs/link/subscriptions/index.d.cts +23 -0
  75. package/__cjs/link/ws/index.cjs +35 -1
  76. package/__cjs/link/ws/index.cjs.map +1 -1
  77. package/__cjs/link/ws/index.d.cts +63 -5
  78. package/__cjs/react/hooks/useSyncExternalStore.cjs +2 -6
  79. package/__cjs/react/hooks/useSyncExternalStore.cjs.map +1 -1
  80. package/__cjs/utilities/internal/removeDirectivesFromDocument.cjs +2 -6
  81. package/__cjs/utilities/internal/removeDirectivesFromDocument.cjs.map +1 -1
  82. package/__cjs/utilities/subscriptions/relay/index.cjs +1 -2
  83. package/__cjs/utilities/subscriptions/relay/index.cjs.map +1 -1
  84. package/__cjs/version.cjs +1 -1
  85. package/cache/inmemory/writeToStore.js +1 -1
  86. package/cache/inmemory/writeToStore.js.map +1 -1
  87. package/core/ObservableQuery.js +1 -1
  88. package/core/ObservableQuery.js.map +1 -1
  89. package/core/QueryInfo.js +1 -2
  90. package/core/QueryInfo.js.map +1 -1
  91. package/core/index.d.ts +1 -2
  92. package/core/index.js +1 -1
  93. package/core/index.js.map +1 -1
  94. package/invariantErrorCodes.js +9 -9
  95. package/link/batch/batchLink.d.ts +103 -27
  96. package/link/batch/batchLink.js +30 -3
  97. package/link/batch/batchLink.js.map +1 -1
  98. package/link/batch/batching.d.ts +2 -2
  99. package/link/batch/batching.js.map +1 -1
  100. package/link/batch/index.d.ts +1 -2
  101. package/link/batch/index.js +1 -1
  102. package/link/batch/index.js.map +1 -1
  103. package/link/batch-http/BaseBatchHttpLink.d.ts +68 -0
  104. package/link/batch-http/BaseBatchHttpLink.js +152 -0
  105. package/link/batch-http/BaseBatchHttpLink.js.map +1 -0
  106. package/link/batch-http/batchHttpLink.d.ts +40 -16
  107. package/link/batch-http/batchHttpLink.js +23 -127
  108. package/link/batch-http/batchHttpLink.js.map +1 -1
  109. package/link/batch-http/index.d.ts +2 -1
  110. package/link/batch-http/index.js +2 -1
  111. package/link/batch-http/index.js.map +1 -1
  112. package/link/client-awareness/ClientAwarenessLink.d.ts +56 -4
  113. package/link/client-awareness/ClientAwarenessLink.js +36 -3
  114. package/link/client-awareness/ClientAwarenessLink.js.map +1 -1
  115. package/link/context/index.d.ts +65 -3
  116. package/link/context/index.js +19 -0
  117. package/link/context/index.js.map +1 -1
  118. package/link/error/index.d.ts +65 -5
  119. package/link/error/index.js +44 -0
  120. package/link/error/index.js.map +1 -1
  121. package/link/http/BaseHttpLink.d.ts +257 -3
  122. package/link/http/BaseHttpLink.js +60 -10
  123. package/link/http/BaseHttpLink.js.map +1 -1
  124. package/link/http/HttpLink.d.ts +41 -141
  125. package/link/http/HttpLink.js +23 -1
  126. package/link/http/HttpLink.js.map +1 -1
  127. package/link/http/checkFetcher.js +1 -1
  128. package/link/http/index.d.ts +0 -2
  129. package/link/http/index.js +0 -1
  130. package/link/http/index.js.map +1 -1
  131. package/link/http/parseAndCheckHttpResponse.js +1 -1
  132. package/link/http/rewriteURIForGET.d.ts +2 -2
  133. package/link/http/rewriteURIForGET.js +2 -3
  134. package/link/http/rewriteURIForGET.js.map +1 -1
  135. package/link/http/selectHttpOptionsAndBody.d.ts +7 -7
  136. package/link/http/selectHttpOptionsAndBody.js.map +1 -1
  137. package/link/persisted-queries/index.d.ts +205 -25
  138. package/link/persisted-queries/index.js +18 -2
  139. package/link/persisted-queries/index.js.map +1 -1
  140. package/link/remove-typename/index.d.ts +0 -1
  141. package/link/remove-typename/index.js.map +1 -1
  142. package/link/remove-typename/removeTypenameFromVariables.d.ts +124 -8
  143. package/link/remove-typename/removeTypenameFromVariables.js +48 -0
  144. package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
  145. package/link/retry/delayFunction.d.ts +2 -39
  146. package/link/retry/delayFunction.js.map +1 -1
  147. package/link/retry/retryFunction.d.ts +2 -29
  148. package/link/retry/retryFunction.js.map +1 -1
  149. package/link/retry/retryLink.d.ts +130 -5
  150. package/link/retry/retryLink.js +36 -11
  151. package/link/retry/retryLink.js.map +1 -1
  152. package/link/schema/index.d.ts +130 -8
  153. package/link/schema/index.js +20 -0
  154. package/link/schema/index.js.map +1 -1
  155. package/link/subscriptions/index.d.ts +23 -0
  156. package/link/subscriptions/index.js +23 -0
  157. package/link/subscriptions/index.js.map +1 -1
  158. package/link/ws/index.d.ts +63 -5
  159. package/link/ws/index.js +31 -1
  160. package/link/ws/index.js.map +1 -1
  161. package/package.json +1 -1
  162. package/react/hooks/useSyncExternalStore.js +1 -1
  163. package/react/hooks/useSyncExternalStore.js.map +1 -1
  164. package/react/hooks-compiled/useSyncExternalStore.js +1 -1
  165. package/react/hooks-compiled/useSyncExternalStore.js.map +1 -1
  166. package/utilities/internal/removeDirectivesFromDocument.js +1 -2
  167. package/utilities/internal/removeDirectivesFromDocument.js.map +1 -1
  168. package/utilities/subscriptions/relay/index.js +1 -2
  169. package/utilities/subscriptions/relay/index.js.map +1 -1
  170. package/version.js +1 -1
  171. package/__cjs/link/http/serializeFetchParameter.cjs +0 -18
  172. package/__cjs/link/http/serializeFetchParameter.cjs.map +0 -1
  173. package/__cjs/link/http/serializeFetchParameter.d.cts +0 -6
  174. package/link/http/serializeFetchParameter.d.ts +0 -6
  175. package/link/http/serializeFetchParameter.js +0 -14
  176. package/link/http/serializeFetchParameter.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 4.0.0-rc.9
4
+
5
+ ### Minor Changes
6
+
7
+ - [#12828](https://github.com/apollographql/apollo-client/pull/12828) [`81b03d8`](https://github.com/apollographql/apollo-client/commit/81b03d86ad7e7384124708477829bcbf63d4fa2c) Thanks [@phryneas](https://github.com/phryneas)! - `invariant.error` will now also log in production builds, not only dev builds
8
+
9
+ ### Patch Changes
10
+
11
+ - [#12822](https://github.com/apollographql/apollo-client/pull/12822) [`103664d`](https://github.com/apollographql/apollo-client/commit/103664dc93c0a7097eaec1a5144e769eb4fb7a31) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `HttpLink.ContextOptions` and `BatchHttpLink.ContextOptions` include `ClientAwarenessLink.ContextOptions`.
12
+
13
+ - [#12650](https://github.com/apollographql/apollo-client/pull/12650) [`2a32ac6`](https://github.com/apollographql/apollo-client/commit/2a32ac6d38de2be0be6891a969ee4f5e3bbca629) Thanks [@phryneas](https://github.com/phryneas)! - Fix a situation where a passed-in `AbortSignal` would override internal unsubscription cancellation behaviour.
14
+
15
+ ## 4.0.0-rc.8
16
+
17
+ ### Major Changes
18
+
19
+ - [#12825](https://github.com/apollographql/apollo-client/pull/12825) [`292b949`](https://github.com/apollographql/apollo-client/commit/292b949e9e1d10a715e0fd403737361f91432fbf) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `serializeFetchParameter` helper is no longer exported and `JSON.stringify` is used directly. As such, the `ClientParseError` type has also been removed in favor of throwing any JSON serialize errors directly.
20
+
21
+ - [#12824](https://github.com/apollographql/apollo-client/pull/12824) [`0506f12`](https://github.com/apollographql/apollo-client/commit/0506f12936d3fe7c840e5d56a5efa20bbce1525e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure the `error` argument for the `delay` and `attempts` functions on `RetryLink` are an `ErrorLike`.
22
+
23
+ - [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move all 1st party link types into a namespace.
24
+
25
+ - [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `OperationBatcher` class is no longer exported from `@apollo/client/link/batch`. It is an implementation detail of `BatchLink` and should not be relied on directly.
26
+
27
+ ### Patch Changes
28
+
29
+ - [#12824](https://github.com/apollographql/apollo-client/pull/12824) [`0506f12`](https://github.com/apollographql/apollo-client/commit/0506f12936d3fe7c840e5d56a5efa20bbce1525e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `RetryLink` now emits a `next` event instead of an `error` event when encountering a protocol errors for multipart subscriptions when the operation is not retried. This ensures the observable notification remains the same as when `RetryLink` is not used.
30
+
31
+ - [#12819](https://github.com/apollographql/apollo-client/pull/12819) [`7ff548d`](https://github.com/apollographql/apollo-client/commit/7ff548dab0f38bfe315fce6cc51105c93d112271) Thanks [@jerelmiller](https://github.com/jerelmiller)! - update type of `HttpLink.Options.fetchOptions` to `RequestInit`
32
+
33
+ - [#12820](https://github.com/apollographql/apollo-client/pull/12820) [`fba3d9e`](https://github.com/apollographql/apollo-client/commit/fba3d9ec96cce9f1a89908e4f33361e27d1f52b4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `fetchOptions` option provided to `HttpLink` and `BatchHttpLink` is now `RequestInit` instead of `any`. The `credentials` option is now a `RequestCredentials` type instead of a `string`.
34
+
35
+ - [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix the type of the argument for the `sha256` function for `PersistedQueryLink` from `...any[]` to `string`.
36
+
37
+ - [#12821](https://github.com/apollographql/apollo-client/pull/12821) [`223a409`](https://github.com/apollographql/apollo-client/commit/223a4094f401bbe7fd3e4c249fa405843b63ba2e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a deprecation warning to `WebSocketLink`.
38
+
3
39
  ## 4.0.0-rc.7
4
40
 
5
41
  ### Major Changes
@@ -223,7 +223,7 @@ class StoreWriter {
223
223
  // provide a default value, so its absence from the written data should
224
224
  // not be cause for alarm.
225
225
  !policies.getReadFunction(typename, field.name.value)) {
226
- __DEV__ && invariant_1.invariant.error(106, (0, internal_1.resultKeyNameFromField)(field), result);
226
+ invariant_1.invariant.error(106, (0, internal_1.resultKeyNameFromField)(field), result);
227
227
  }
228
228
  });
229
229
  // Identify the result object, even if dataId was already provided,