@tanstack/query-core 5.70.0 → 5.71.0

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 (78) hide show
  1. package/build/legacy/{hydration-CIqZ2rw6.d.cts → hydration-Ct1VFeEM.d.cts} +7 -0
  2. package/build/legacy/{hydration-Cik0p0G0.d.ts → hydration-DY4YFVVx.d.ts} +7 -0
  3. package/build/legacy/hydration.d.cts +1 -1
  4. package/build/legacy/hydration.d.ts +1 -1
  5. package/build/legacy/index.d.cts +1 -1
  6. package/build/legacy/index.d.ts +1 -1
  7. package/build/legacy/infiniteQueryBehavior.d.cts +1 -1
  8. package/build/legacy/infiniteQueryBehavior.d.ts +1 -1
  9. package/build/legacy/infiniteQueryObserver.d.cts +1 -1
  10. package/build/legacy/infiniteQueryObserver.d.ts +1 -1
  11. package/build/legacy/mutation.d.cts +1 -1
  12. package/build/legacy/mutation.d.ts +1 -1
  13. package/build/legacy/mutationCache.d.cts +1 -1
  14. package/build/legacy/mutationCache.d.ts +1 -1
  15. package/build/legacy/mutationObserver.d.cts +1 -1
  16. package/build/legacy/mutationObserver.d.ts +1 -1
  17. package/build/legacy/queriesObserver.d.cts +1 -1
  18. package/build/legacy/queriesObserver.d.ts +1 -1
  19. package/build/legacy/query.d.cts +1 -1
  20. package/build/legacy/query.d.ts +1 -1
  21. package/build/legacy/queryCache.d.cts +1 -1
  22. package/build/legacy/queryCache.d.ts +1 -1
  23. package/build/legacy/queryClient.cjs +7 -0
  24. package/build/legacy/queryClient.cjs.map +1 -1
  25. package/build/legacy/queryClient.d.cts +1 -1
  26. package/build/legacy/queryClient.d.ts +1 -1
  27. package/build/legacy/queryClient.js +7 -0
  28. package/build/legacy/queryClient.js.map +1 -1
  29. package/build/legacy/queryObserver.d.cts +1 -1
  30. package/build/legacy/queryObserver.d.ts +1 -1
  31. package/build/legacy/retryer.d.cts +1 -1
  32. package/build/legacy/retryer.d.ts +1 -1
  33. package/build/legacy/streamedQuery.d.cts +1 -1
  34. package/build/legacy/streamedQuery.d.ts +1 -1
  35. package/build/legacy/types.d.cts +1 -1
  36. package/build/legacy/types.d.ts +1 -1
  37. package/build/legacy/utils.d.cts +1 -1
  38. package/build/legacy/utils.d.ts +1 -1
  39. package/build/modern/{hydration-CIqZ2rw6.d.cts → hydration-Ct1VFeEM.d.cts} +7 -0
  40. package/build/modern/{hydration-Cik0p0G0.d.ts → hydration-DY4YFVVx.d.ts} +7 -0
  41. package/build/modern/hydration.d.cts +1 -1
  42. package/build/modern/hydration.d.ts +1 -1
  43. package/build/modern/index.d.cts +1 -1
  44. package/build/modern/index.d.ts +1 -1
  45. package/build/modern/infiniteQueryBehavior.d.cts +1 -1
  46. package/build/modern/infiniteQueryBehavior.d.ts +1 -1
  47. package/build/modern/infiniteQueryObserver.d.cts +1 -1
  48. package/build/modern/infiniteQueryObserver.d.ts +1 -1
  49. package/build/modern/mutation.d.cts +1 -1
  50. package/build/modern/mutation.d.ts +1 -1
  51. package/build/modern/mutationCache.d.cts +1 -1
  52. package/build/modern/mutationCache.d.ts +1 -1
  53. package/build/modern/mutationObserver.d.cts +1 -1
  54. package/build/modern/mutationObserver.d.ts +1 -1
  55. package/build/modern/queriesObserver.d.cts +1 -1
  56. package/build/modern/queriesObserver.d.ts +1 -1
  57. package/build/modern/query.d.cts +1 -1
  58. package/build/modern/query.d.ts +1 -1
  59. package/build/modern/queryCache.d.cts +1 -1
  60. package/build/modern/queryCache.d.ts +1 -1
  61. package/build/modern/queryClient.cjs +7 -0
  62. package/build/modern/queryClient.cjs.map +1 -1
  63. package/build/modern/queryClient.d.cts +1 -1
  64. package/build/modern/queryClient.d.ts +1 -1
  65. package/build/modern/queryClient.js +7 -0
  66. package/build/modern/queryClient.js.map +1 -1
  67. package/build/modern/queryObserver.d.cts +1 -1
  68. package/build/modern/queryObserver.d.ts +1 -1
  69. package/build/modern/retryer.d.cts +1 -1
  70. package/build/modern/retryer.d.ts +1 -1
  71. package/build/modern/streamedQuery.d.cts +1 -1
  72. package/build/modern/streamedQuery.d.ts +1 -1
  73. package/build/modern/types.d.cts +1 -1
  74. package/build/modern/types.d.ts +1 -1
  75. package/build/modern/utils.d.cts +1 -1
  76. package/build/modern/utils.d.ts +1 -1
  77. package/package.json +1 -1
  78. package/src/queryClient.ts +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/query-core",
3
- "version": "5.70.0",
3
+ "version": "5.71.0",
4
4
  "description": "The framework agnostic core that powers TanStack Query",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -119,6 +119,13 @@ export class QueryClient {
119
119
  return this.#mutationCache.findAll({ ...filters, status: 'pending' }).length
120
120
  }
121
121
 
122
+ /**
123
+ * Imperative (non-reactive) way to retrieve data for a QueryKey.
124
+ * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
125
+ *
126
+ * Hint: Do not use this function inside a component, because it won't receive updates.
127
+ * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
128
+ */
122
129
  getQueryData<
123
130
  TQueryFnData = unknown,
124
131
  TTaggedQueryKey extends QueryKey = QueryKey,