@apollo/client 3.14.0-alpha.0 → 3.14.0-alpha.1

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 (198) hide show
  1. package/.changeset/breezy-lions-rule.md +5 -0
  2. package/.changeset/great-jobs-fetch.md +5 -0
  3. package/.changeset/pre.json +4 -1
  4. package/.changeset/tidy-bulldogs-exercise.md +5 -0
  5. package/CHANGELOG.md +10 -0
  6. package/apollo-client.cjs +187 -119
  7. package/apollo-client.cjs.map +1 -1
  8. package/apollo-client.min.cjs +1 -1
  9. package/cache/cache.cjs +7 -2
  10. package/cache/cache.cjs.map +1 -1
  11. package/cache/cache.cjs.native.js +7 -2
  12. package/cache/inmemory/inMemoryCache.d.ts +8 -0
  13. package/cache/inmemory/inMemoryCache.js +3 -0
  14. package/cache/inmemory/inMemoryCache.js.map +1 -1
  15. package/core/ApolloClient.d.ts +9 -9
  16. package/core/ApolloClient.js +6 -1
  17. package/core/ApolloClient.js.map +1 -1
  18. package/core/LocalState.js +2 -2
  19. package/core/ObservableQuery.d.ts +51 -6
  20. package/core/ObservableQuery.js +89 -13
  21. package/core/ObservableQuery.js.map +1 -1
  22. package/core/QueryInfo.js +6 -3
  23. package/core/QueryInfo.js.map +1 -1
  24. package/core/QueryManager.js +14 -12
  25. package/core/QueryManager.js.map +1 -1
  26. package/core/core.cjs +85 -33
  27. package/core/core.cjs.map +1 -1
  28. package/core/core.cjs.native.js +85 -33
  29. package/core/types.d.ts +177 -3
  30. package/core/types.js.map +1 -1
  31. package/core/watchQueryOptions.d.ts +10 -2
  32. package/core/watchQueryOptions.js.map +1 -1
  33. package/dev/dev.cjs +149 -97
  34. package/dev/dev.cjs.map +1 -1
  35. package/dev/dev.cjs.native.js +149 -97
  36. package/errors/errors.cjs.map +1 -1
  37. package/errors/index.d.ts +19 -0
  38. package/errors/index.js +19 -0
  39. package/errors/index.js.map +1 -1
  40. package/invariantErrorCodes.js +161 -96
  41. package/link/batch-http/batch-http.cjs +9 -0
  42. package/link/batch-http/batch-http.cjs.map +1 -1
  43. package/link/batch-http/batch-http.cjs.native.js +9 -0
  44. package/link/batch-http/batchHttpLink.js +9 -0
  45. package/link/batch-http/batchHttpLink.js.map +1 -1
  46. package/link/core/ApolloLink.d.ts +8 -0
  47. package/link/core/ApolloLink.js +19 -2
  48. package/link/core/ApolloLink.js.map +1 -1
  49. package/link/core/core.cjs +24 -2
  50. package/link/core/core.cjs.map +1 -1
  51. package/link/core/core.cjs.native.js +24 -2
  52. package/link/core/types.d.ts +20 -0
  53. package/link/core/types.js.map +1 -1
  54. package/link/error/index.d.ts +48 -0
  55. package/link/error/index.js.map +1 -1
  56. package/link/http/checkFetcher.js +1 -1
  57. package/link/http/createHttpLink.js +4 -1
  58. package/link/http/createHttpLink.js.map +1 -1
  59. package/link/http/http.cjs +6 -3
  60. package/link/http/http.cjs.map +1 -1
  61. package/link/http/http.cjs.native.js +6 -3
  62. package/link/http/serializeFetchParameter.js +1 -1
  63. package/link/persisted-queries/index.d.ts +38 -0
  64. package/link/persisted-queries/index.js +2 -2
  65. package/link/persisted-queries/index.js.map +1 -1
  66. package/link/persisted-queries/persisted-queries.cjs +2 -2
  67. package/link/persisted-queries/persisted-queries.cjs.map +1 -1
  68. package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
  69. package/link/utils/fromError.d.ts +16 -0
  70. package/link/utils/fromError.js +16 -0
  71. package/link/utils/fromError.js.map +1 -1
  72. package/link/utils/fromPromise.d.ts +16 -0
  73. package/link/utils/fromPromise.js +16 -0
  74. package/link/utils/fromPromise.js.map +1 -1
  75. package/link/utils/throwServerError.d.ts +30 -0
  76. package/link/utils/throwServerError.js +17 -0
  77. package/link/utils/throwServerError.js.map +1 -1
  78. package/link/utils/toPromise.d.ts +16 -0
  79. package/link/utils/toPromise.js +17 -1
  80. package/link/utils/toPromise.js.map +1 -1
  81. package/link/utils/utils.cjs +2 -2
  82. package/link/utils/utils.cjs.map +1 -1
  83. package/link/utils/utils.cjs.native.js +2 -2
  84. package/link/utils/validateOperation.js +1 -1
  85. package/masking/maskDefinition.js +2 -2
  86. package/masking/maskFragment.js +2 -2
  87. package/masking/maskOperation.js +1 -1
  88. package/masking/masking.cjs +6 -6
  89. package/masking/masking.cjs.map +1 -1
  90. package/masking/masking.cjs.native.js +6 -6
  91. package/masking/utils.js +1 -1
  92. package/masking/utils.js.map +1 -1
  93. package/package.json +1 -1
  94. package/react/components/Mutation.js +1 -1
  95. package/react/components/Query.js +1 -1
  96. package/react/components/Subscription.js +1 -1
  97. package/react/components/components.cjs +6 -4
  98. package/react/components/components.cjs.map +1 -1
  99. package/react/components/components.cjs.native.js +6 -4
  100. package/react/context/ApolloConsumer.js +1 -1
  101. package/react/context/ApolloContext.js +2 -2
  102. package/react/context/ApolloProvider.js +1 -1
  103. package/react/context/context.cjs +4 -4
  104. package/react/context/context.cjs.map +1 -1
  105. package/react/context/context.cjs.native.js +4 -4
  106. package/react/hoc/graphql.js +1 -1
  107. package/react/hoc/hoc-utils.js +1 -1
  108. package/react/hoc/hoc.cjs +9 -7
  109. package/react/hoc/hoc.cjs.map +1 -1
  110. package/react/hoc/hoc.cjs.native.js +9 -7
  111. package/react/hoc/mutation-hoc.js +1 -1
  112. package/react/hoc/query-hoc.js +1 -1
  113. package/react/hoc/subscription-hoc.js +1 -1
  114. package/react/hoc/withApollo.js +1 -1
  115. package/react/hooks/hooks.cjs +18 -16
  116. package/react/hooks/hooks.cjs.map +1 -1
  117. package/react/hooks/hooks.cjs.native.js +18 -16
  118. package/react/hooks/internal/useWarnRemoved.d.ts +2 -1
  119. package/react/hooks/internal/useWarnRemoved.js.map +1 -1
  120. package/react/hooks/internal/useWarnRemovedOption.js +1 -1
  121. package/react/hooks/useApolloClient.js +1 -1
  122. package/react/hooks/useLazyQuery.js +2 -2
  123. package/react/hooks/useLoadableQuery.js +2 -2
  124. package/react/hooks/useQuery.js +1 -1
  125. package/react/hooks/useSubscription.js +3 -3
  126. package/react/hooks/useSuspenseQuery.js +2 -2
  127. package/react/hooks/useSyncExternalStore.js +1 -1
  128. package/react/internal/cache/QueryReference.d.ts +1 -0
  129. package/react/internal/cache/QueryReference.js +5 -2
  130. package/react/internal/cache/QueryReference.js.map +1 -1
  131. package/react/internal/internal.cjs +16 -3
  132. package/react/internal/internal.cjs.map +1 -1
  133. package/react/internal/internal.cjs.native.js +16 -3
  134. package/react/parser/index.js +6 -6
  135. package/react/parser/parser.cjs +9 -7
  136. package/react/parser/parser.cjs.map +1 -1
  137. package/react/parser/parser.cjs.native.js +9 -7
  138. package/react/react.cjs +4 -2
  139. package/react/react.cjs.map +1 -1
  140. package/react/react.cjs.native.js +4 -2
  141. package/react/types/types.d.ts +40 -0
  142. package/react/types/types.documentation.d.ts +1 -1
  143. package/react/types/types.documentation.js.map +1 -1
  144. package/react/types/types.js.map +1 -1
  145. package/testing/core/core.cjs +17 -3
  146. package/testing/core/core.cjs.map +1 -1
  147. package/testing/core/core.cjs.native.js +17 -3
  148. package/testing/core/itAsync.d.ts +5 -0
  149. package/testing/core/itAsync.js +5 -0
  150. package/testing/core/itAsync.js.map +1 -1
  151. package/testing/core/mocking/mockClient.d.ts +4 -0
  152. package/testing/core/mocking/mockClient.js +4 -0
  153. package/testing/core/mocking/mockClient.js.map +1 -1
  154. package/testing/core/mocking/mockLink.d.ts +10 -0
  155. package/testing/core/mocking/mockLink.js +23 -4
  156. package/testing/core/mocking/mockLink.js.map +1 -1
  157. package/testing/core/mocking/mockSubscriptionLink.d.ts +4 -0
  158. package/testing/core/mocking/mockSubscriptionLink.js +4 -0
  159. package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
  160. package/testing/core/subscribeAndCount.d.ts +4 -0
  161. package/testing/core/subscribeAndCount.js +4 -0
  162. package/testing/core/subscribeAndCount.js.map +1 -1
  163. package/testing/experimental/createSchemaFetch.d.ts +1 -1
  164. package/testing/experimental/createSchemaFetch.js +1 -1
  165. package/testing/experimental/createSchemaFetch.js.map +1 -1
  166. package/testing/experimental/createTestSchema.d.ts +1 -1
  167. package/testing/experimental/createTestSchema.js +1 -1
  168. package/testing/experimental/createTestSchema.js.map +1 -1
  169. package/testing/experimental/experimental.cjs.map +1 -1
  170. package/testing/testing.cjs +4 -2
  171. package/testing/testing.cjs.map +1 -1
  172. package/testing/testing.cjs.native.js +4 -2
  173. package/utilities/deprecation/index.d.ts +83 -3
  174. package/utilities/deprecation/index.js +15 -3
  175. package/utilities/deprecation/index.js.map +1 -1
  176. package/utilities/globals/globals.cjs +1 -1
  177. package/utilities/globals/globals.cjs.map +1 -1
  178. package/utilities/globals/globals.cjs.native.js +1 -1
  179. package/utilities/graphql/DocumentTransform.js +1 -1
  180. package/utilities/graphql/directives.js +7 -7
  181. package/utilities/graphql/fragments.js +3 -3
  182. package/utilities/graphql/getFromAST.js +8 -8
  183. package/utilities/graphql/storeUtils.js +1 -1
  184. package/utilities/graphql/transform.js +2 -2
  185. package/utilities/observables/asyncMap.d.ts +13 -0
  186. package/utilities/observables/asyncMap.js +13 -0
  187. package/utilities/observables/asyncMap.js.map +1 -1
  188. package/utilities/observables/iteration.d.ts +4 -0
  189. package/utilities/observables/iteration.js +4 -0
  190. package/utilities/observables/iteration.js.map +1 -1
  191. package/utilities/subscriptions/urql/index.d.ts +5 -0
  192. package/utilities/subscriptions/urql/index.js +5 -0
  193. package/utilities/subscriptions/urql/index.js.map +1 -1
  194. package/utilities/subscriptions/urql/urql.cjs.map +1 -1
  195. package/utilities/utilities.cjs +22 -22
  196. package/utilities/utilities.cjs.map +1 -1
  197. package/utilities/utilities.cjs.native.js +22 -22
  198. package/version.js +1 -1
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": minor
3
+ ---
4
+
5
+ Add deprecations and warnings to remaining APIs changed in Apollo Client 4.0.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": minor
3
+ ---
4
+
5
+ Add `@deprecated` tags to all properties returned from any query API (e.g. `client.query`, `observableQuery.refetch`, etc.), `client.mutate`, and `client.subscribe` that are no longer available in Apollo Client 4.0.
@@ -5,12 +5,15 @@
5
5
  "@apollo/client": "3.13.4"
6
6
  },
7
7
  "changesets": [
8
+ "breezy-lions-rule",
8
9
  "chilled-cameras-scream",
10
+ "great-jobs-fetch",
9
11
  "great-suns-cover",
10
12
  "perfect-donuts-roll",
11
13
  "popular-waves-drop",
12
14
  "shy-dragons-tease",
13
15
  "smooth-countries-cough",
14
- "spotty-walls-repair"
16
+ "spotty-walls-repair",
17
+ "tidy-bulldogs-exercise"
15
18
  ]
16
19
  }
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": minor
3
+ ---
4
+
5
+ Warn when using a `standby` fetch policy with `client.query`.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 3.14.0-alpha.1
4
+
5
+ ### Minor Changes
6
+
7
+ - [#12752](https://github.com/apollographql/apollo-client/pull/12752) [`8b779b4`](https://github.com/apollographql/apollo-client/commit/8b779b428b9dc9dad3e78f02bba6646ff415631d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add deprecations and warnings to remaining APIs changed in Apollo Client 4.0.
8
+
9
+ - [#12751](https://github.com/apollographql/apollo-client/pull/12751) [`567cad8`](https://github.com/apollographql/apollo-client/commit/567cad8fcc30ac3b82560abc24970d33f160622e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `@deprecated` tags to all properties returned from any query API (e.g. `client.query`, `observableQuery.refetch`, etc.), `client.mutate`, and `client.subscribe` that are no longer available in Apollo Client 4.0.
10
+
11
+ - [#12751](https://github.com/apollographql/apollo-client/pull/12751) [`567cad8`](https://github.com/apollographql/apollo-client/commit/567cad8fcc30ac3b82560abc24970d33f160622e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using a `standby` fetch policy with `client.query`.
12
+
3
13
  ## 3.14.0-alpha.0
4
14
 
5
15
  ### Minor Changes