@apollo/client 4.2.0-alpha.5 → 4.2.0-alpha.7

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 (48) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/__cjs/core/ApolloClient.cjs.map +1 -1
  3. package/__cjs/core/ApolloClient.d.cts +29 -2
  4. package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
  5. package/__cjs/react/hooks/useBackgroundQuery.d.cts +1019 -19
  6. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  7. package/__cjs/react/hooks/useLazyQuery.d.cts +115 -7
  8. package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
  9. package/__cjs/react/hooks/useLoadableQuery.d.cts +195 -8
  10. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  11. package/__cjs/react/hooks/useMutation.d.cts +20 -9
  12. package/__cjs/react/hooks/useQuery.cjs.map +1 -1
  13. package/__cjs/react/hooks/useQuery.d.cts +280 -11
  14. package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
  15. package/__cjs/react/hooks/useSuspenseQuery.d.cts +405 -13
  16. package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
  17. package/__cjs/react/query-preloader/createQueryPreloader.d.cts +395 -123
  18. package/__cjs/version.cjs +1 -1
  19. package/core/ApolloClient.d.ts +29 -2
  20. package/core/ApolloClient.js.map +1 -1
  21. package/package.json +1 -1
  22. package/react/hooks/useBackgroundQuery.d.ts +1019 -19
  23. package/react/hooks/useBackgroundQuery.js.map +1 -1
  24. package/react/hooks/useLazyQuery.d.ts +115 -7
  25. package/react/hooks/useLazyQuery.js.map +1 -1
  26. package/react/hooks/useLoadableQuery.d.ts +195 -8
  27. package/react/hooks/useLoadableQuery.js.map +1 -1
  28. package/react/hooks/useMutation.d.ts +20 -9
  29. package/react/hooks/useMutation.js.map +1 -1
  30. package/react/hooks/useQuery.d.ts +280 -11
  31. package/react/hooks/useQuery.js.map +1 -1
  32. package/react/hooks/useSuspenseQuery.d.ts +405 -13
  33. package/react/hooks/useSuspenseQuery.js.map +1 -1
  34. package/react/hooks-compiled/useBackgroundQuery.d.ts +1019 -19
  35. package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
  36. package/react/hooks-compiled/useLazyQuery.d.ts +115 -7
  37. package/react/hooks-compiled/useLazyQuery.js.map +1 -1
  38. package/react/hooks-compiled/useLoadableQuery.d.ts +195 -8
  39. package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
  40. package/react/hooks-compiled/useMutation.d.ts +20 -9
  41. package/react/hooks-compiled/useMutation.js.map +1 -1
  42. package/react/hooks-compiled/useQuery.d.ts +280 -11
  43. package/react/hooks-compiled/useQuery.js.map +1 -1
  44. package/react/hooks-compiled/useSuspenseQuery.d.ts +405 -13
  45. package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
  46. package/react/query-preloader/createQueryPreloader.d.ts +395 -123
  47. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  48. package/version.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 4.2.0-alpha.7
4
+
5
+ ### Minor Changes
6
+
7
+ - [#13222](https://github.com/apollographql/apollo-client/pull/13222) [`b93c172`](https://github.com/apollographql/apollo-client/commit/b93c1723b4b7a9d1296ddd57035bc4fe39c8d971) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Extend the `defaultOptions` type-safety work to `preloadQuery` (returned from `createQueryPreloader`). Defaults declared in `DeclareDefaultOptions.WatchQuery` now work with `preloadQuery` to ensure the `PreloadedQueryRef`'s data states are correctly set.
8
+
9
+ ```ts
10
+ // apollo.d.ts
11
+ import "@apollo/client";
12
+
13
+ declare module "@apollo/client" {
14
+ namespace ApolloClient {
15
+ namespace DeclareDefaultOptions {
16
+ interface WatchQuery {
17
+ errorPolicy: "all";
18
+ }
19
+ }
20
+ }
21
+ }
22
+ ```
23
+
24
+ ```ts
25
+ const preloadQuery = createQueryPreloader(client);
26
+ const queryRef = preloadQuery(QUERY);
27
+ // ^? PreloadedQueryRef<TData, TVariables, "complete" | "streaming" | "empty">
28
+ ```
29
+
30
+ ## 4.2.0-alpha.6
31
+
32
+ ### Patch Changes
33
+
34
+ - [#13217](https://github.com/apollographql/apollo-client/pull/13217) [`790f987`](https://github.com/apollographql/apollo-client/commit/790f987ed65435159dd2c6df5fe2fa01587a179e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix the deprecation for the classic signatures for function overloads that rely on type inference from a `TypedDocumentNode`. The deprecation now only applies to classic signatures that provide explicit type arguments to encourage the use of `TypedDocumentNode`.
35
+
3
36
  ## 4.2.0-alpha.5
4
37
 
5
38
  ### Patch Changes