@apollo/client 3.12.8 → 3.12.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 (51) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/apollo-client.cjs +9 -5
  3. package/apollo-client.cjs.map +1 -1
  4. package/apollo-client.min.cjs +1 -1
  5. package/core/core.cjs +1 -1
  6. package/core/core.cjs.map +1 -1
  7. package/core/core.cjs.native.js +1 -1
  8. package/dev/dev.cjs +1 -1
  9. package/dev/dev.cjs.map +1 -1
  10. package/dev/dev.cjs.native.js +1 -1
  11. package/errors/index.d.ts +2 -8
  12. package/errors/index.js.map +1 -1
  13. package/link/error/index.d.ts +2 -5
  14. package/link/error/index.js.map +1 -1
  15. package/link/retry/retry.cjs +13 -1
  16. package/link/retry/retry.cjs.map +1 -1
  17. package/link/retry/retry.cjs.native.js +13 -1
  18. package/link/retry/retryLink.js +15 -1
  19. package/link/retry/retryLink.js.map +1 -1
  20. package/package.json +4 -4
  21. package/react/hooks/hooks.cjs +8 -4
  22. package/react/hooks/hooks.cjs.map +1 -1
  23. package/react/hooks/hooks.cjs.native.js +8 -4
  24. package/react/hooks/useQueryRefHandlers.js +7 -10
  25. package/react/hooks/useQueryRefHandlers.js.map +1 -1
  26. package/react/hooks/useReadQuery.js +7 -10
  27. package/react/hooks/useReadQuery.js.map +1 -1
  28. package/react/internal/internal.cjs +1 -1
  29. package/react/internal/internal.cjs.map +1 -1
  30. package/react/internal/internal.cjs.native.js +1 -1
  31. package/testing/matchers/index.js +6 -0
  32. package/testing/matchers/index.js.map +1 -1
  33. package/testing/matchers/toEmitApolloQueryResult.d.ts +8 -0
  34. package/testing/matchers/toEmitApolloQueryResult.js +51 -0
  35. package/testing/matchers/toEmitApolloQueryResult.js.map +1 -0
  36. package/testing/matchers/toEmitFetchResult.d.ts +8 -0
  37. package/testing/matchers/toEmitFetchResult.js +51 -0
  38. package/testing/matchers/toEmitFetchResult.js.map +1 -0
  39. package/testing/matchers/toEqualFetchResult.d.ts +4 -0
  40. package/testing/matchers/toEqualFetchResult.js +20 -0
  41. package/testing/matchers/toEqualFetchResult.js.map +1 -0
  42. package/utilities/globals/globals.cjs +1 -1
  43. package/utilities/globals/globals.cjs.map +1 -1
  44. package/utilities/globals/globals.cjs.native.js +1 -1
  45. package/version.js +1 -1
  46. package/testing/core/mocking/mockQueryManager.d.ts +0 -21
  47. package/testing/core/mocking/mockQueryManager.js +0 -19
  48. package/testing/core/mocking/mockQueryManager.js.map +0 -1
  49. package/testing/core/mocking/mockWatchQuery.d.ts +0 -5
  50. package/testing/core/mocking/mockWatchQuery.js +0 -15
  51. package/testing/core/mocking/mockWatchQuery.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollo/client",
3
- "version": "3.12.8",
3
+ "version": "3.12.10",
4
4
  "description": "A fully-featured caching GraphQL client.",
5
5
  "private": false,
6
6
  "keywords": [
@@ -31,7 +31,7 @@
31
31
  "homepage": "https://www.apollographql.com/docs/react/",
32
32
  "peerDependencies": {
33
33
  "graphql": "^15.0.0 || ^16.0.0",
34
- "graphql-ws": "^5.5.5",
34
+ "graphql-ws": "^5.5.5 || ^6.0.3",
35
35
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc",
36
36
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc",
37
37
  "subscriptions-transport-ws": "^0.9.0 || ^0.11.0"
@@ -66,6 +66,7 @@
66
66
  "zen-observable-ts": "^1.2.5"
67
67
  },
68
68
  "devDependencies": {
69
+ "@actions/github-script": "github:actions/github-script#v7.0.1",
69
70
  "@arethetypeswrong/cli": "0.15.3",
70
71
  "@ark/attest": "0.28.0",
71
72
  "@babel/parser": "7.25.0",
@@ -123,7 +124,7 @@
123
124
  "globals": "15.14.0",
124
125
  "graphql": "16.9.0",
125
126
  "graphql-17-alpha2": "npm:graphql@17.0.0-alpha.2",
126
- "graphql-ws": "5.16.0",
127
+ "graphql-ws": "6.0.3",
127
128
  "jest": "29.7.0",
128
129
  "jest-environment-jsdom": "29.7.0",
129
130
  "jest-junit": "16.0.0",
@@ -156,7 +157,6 @@
156
157
  "tsx": "4.19.2",
157
158
  "typedoc": "0.25.0",
158
159
  "typescript": "5.7.3",
159
- "wait-for-observables": "1.0.3",
160
160
  "web-streams-polyfill": "4.0.0",
161
161
  "whatwg-fetch": "3.6.20"
162
162
  },
@@ -1131,9 +1131,11 @@ function useLoadableQuery(query, options) {
1131
1131
 
1132
1132
  function useQueryRefHandlers(queryRef) {
1133
1133
  var unwrapped = internal.unwrapQueryRef(queryRef);
1134
- return wrapHook("useQueryRefHandlers", useQueryRefHandlers_, unwrapped ?
1134
+ var clientOrObsQuery = useApolloClient(unwrapped ?
1135
1135
  unwrapped["observable"]
1136
- : useApolloClient())(queryRef);
1136
+ : undefined);
1137
+ return wrapHook("useQueryRefHandlers",
1138
+ useQueryRefHandlers_, clientOrObsQuery)(queryRef);
1137
1139
  }
1138
1140
  function useQueryRefHandlers_(queryRef) {
1139
1141
  internal.assertWrappedQueryRef(queryRef);
@@ -1166,9 +1168,11 @@ function useQueryRefHandlers_(queryRef) {
1166
1168
 
1167
1169
  function useReadQuery(queryRef) {
1168
1170
  var unwrapped = internal.unwrapQueryRef(queryRef);
1169
- return wrapHook("useReadQuery", useReadQuery_, unwrapped ?
1171
+ var clientOrObsQuery = useApolloClient(unwrapped ?
1170
1172
  unwrapped["observable"]
1171
- : useApolloClient())(queryRef);
1173
+ : undefined);
1174
+ return wrapHook("useReadQuery",
1175
+ useReadQuery_, clientOrObsQuery)(queryRef);
1172
1176
  }
1173
1177
  function useReadQuery_(queryRef) {
1174
1178
  internal.assertWrappedQueryRef(queryRef);