@apollo/client 4.2.9 → 4.2.10

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 (62) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/__cjs/core/ApolloClient.cjs.map +1 -1
  3. package/__cjs/core/ApolloClient.d.cts +44 -10
  4. package/__cjs/core/ObservableQuery.cjs.map +1 -1
  5. package/__cjs/core/ObservableQuery.d.cts +12 -1
  6. package/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
  7. package/__cjs/react/hooks/useBackgroundQuery.d.cts +92 -47
  8. package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
  9. package/__cjs/react/hooks/useLazyQuery.d.cts +26 -20
  10. package/__cjs/react/hooks/useLoadableQuery.cjs.map +1 -1
  11. package/__cjs/react/hooks/useLoadableQuery.d.cts +23 -15
  12. package/__cjs/react/hooks/useMutation.cjs.map +1 -1
  13. package/__cjs/react/hooks/useMutation.d.cts +10 -7
  14. package/__cjs/react/hooks/useQuery.cjs.map +1 -1
  15. package/__cjs/react/hooks/useQuery.d.cts +66 -32
  16. package/__cjs/react/hooks/useQueryRefHandlers.cjs.map +1 -1
  17. package/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
  18. package/__cjs/react/hooks/useSuspenseQuery.d.cts +75 -34
  19. package/__cjs/react/internal/cache/QueryReference.cjs.map +1 -1
  20. package/__cjs/react/internal/types.d.cts +14 -3
  21. package/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
  22. package/__cjs/react/query-preloader/createQueryPreloader.d.cts +20 -5
  23. package/__cjs/version.cjs +1 -1
  24. package/__cjs/version.cjs.map +1 -1
  25. package/core/ApolloClient.d.ts +44 -10
  26. package/core/ApolloClient.js.map +1 -1
  27. package/core/ObservableQuery.d.ts +12 -1
  28. package/core/ObservableQuery.js.map +1 -1
  29. package/package.json +1 -1
  30. package/react/hooks/useBackgroundQuery.d.ts +92 -47
  31. package/react/hooks/useBackgroundQuery.js.map +1 -1
  32. package/react/hooks/useLazyQuery.d.ts +26 -20
  33. package/react/hooks/useLazyQuery.js.map +1 -1
  34. package/react/hooks/useLoadableQuery.d.ts +23 -15
  35. package/react/hooks/useLoadableQuery.js.map +1 -1
  36. package/react/hooks/useMutation.d.ts +10 -7
  37. package/react/hooks/useMutation.js.map +1 -1
  38. package/react/hooks/useQuery.d.ts +66 -32
  39. package/react/hooks/useQuery.js.map +1 -1
  40. package/react/hooks/useQueryRefHandlers.js.map +1 -1
  41. package/react/hooks/useSuspenseQuery.d.ts +75 -34
  42. package/react/hooks/useSuspenseQuery.js.map +1 -1
  43. package/react/hooks-compiled/useBackgroundQuery.d.ts +92 -47
  44. package/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
  45. package/react/hooks-compiled/useLazyQuery.d.ts +26 -20
  46. package/react/hooks-compiled/useLazyQuery.js.map +1 -1
  47. package/react/hooks-compiled/useLoadableQuery.d.ts +23 -15
  48. package/react/hooks-compiled/useLoadableQuery.js.map +1 -1
  49. package/react/hooks-compiled/useMutation.d.ts +10 -7
  50. package/react/hooks-compiled/useMutation.js.map +1 -1
  51. package/react/hooks-compiled/useQuery.d.ts +66 -32
  52. package/react/hooks-compiled/useQuery.js.map +1 -1
  53. package/react/hooks-compiled/useQueryRefHandlers.js.map +1 -1
  54. package/react/hooks-compiled/useSuspenseQuery.d.ts +75 -34
  55. package/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
  56. package/react/internal/cache/QueryReference.js.map +1 -1
  57. package/react/internal/types.d.ts +15 -4
  58. package/react/internal/types.js.map +1 -1
  59. package/react/query-preloader/createQueryPreloader.d.ts +20 -5
  60. package/react/query-preloader/createQueryPreloader.js.map +1 -1
  61. package/version.js +1 -1
  62. package/version.js.map +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 4.2.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#13385](https://github.com/apollographql/apollo-client/pull/13385) [`bfb674e`](https://github.com/apollographql/apollo-client/commit/bfb674ec0ac9cd296b7ea2992d9deebf68edaea9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix accidental widening of the `client.mutate` return type when `optimisticResponse` was present.
8
+
9
+ - [#13382](https://github.com/apollographql/apollo-client/pull/13382) [`365373e`](https://github.com/apollographql/apollo-client/commit/365373e0a0b647e89183245c3904d58499aa63e1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix result types widened when a query's variables had constant types (e.g. `TypedDocumentNode<Data, { type: "main" }>`). This caused options such as `returnPartialData` or `errorPolicy` to be reported as their widened types (e.g. `boolean`, `ErrorPolicy`) instead of the value that was passed which returned the wrong `data` and `dataState` types.
10
+
11
+ - [#13382](https://github.com/apollographql/apollo-client/pull/13382) [`365373e`](https://github.com/apollographql/apollo-client/commit/365373e0a0b647e89183245c3904d58499aa63e1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where unknown options were permitted by TypeScript when passed alongside a valid option to APIs with modern signatures.
12
+
13
+ - [#13383](https://github.com/apollographql/apollo-client/pull/13383) [`5840f50`](https://github.com/apollographql/apollo-client/commit/5840f5014d0a6bb9b963801657cd68b0a1aba6c8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Update the return type of `refetch`, `fetchMore` and `useLazyQuery`'s `execute` function on the provided `errorPolicy`. Previously these APIs all used the default type which typed `data` as `TData | undefined` and `error` as `ErrorLike | undefined`.
14
+
3
15
  ## 4.2.9
4
16
 
5
17
  ### Patch Changes