Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TanStack/query
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.49.1
Choose a base ref
...
head repository: TanStack/query
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.49.2
Choose a head ref
  • 3 commits
  • 30 files changed
  • 2 contributors

Commits on Jun 30, 2024

  1. fix(react-query): experimental before/after query options (#7651)

    tannerlinsley authored Jun 30, 2024
    Copy the full SHA
    4be599f View commit details
  2. fix(react-query): experimental before/after query options (#7652)

    tannerlinsley authored Jun 30, 2024
    Copy the full SHA
    56fad10 View commit details
  3. release: v5.49.2

    tannerlinsley committed Jun 30, 2024
    Copy the full SHA
    46bed74 View commit details
Showing with 119 additions and 108 deletions.
  1. +2 −2 examples/react/algolia/package.json
  2. +2 −2 examples/react/auto-refetching/package.json
  3. +2 −2 examples/react/basic-graphql-request/package.json
  4. +3 −3 examples/react/basic-typescript/package.json
  5. +2 −2 examples/react/basic/package.json
  6. +2 −2 examples/react/default-query-function/package.json
  7. +2 −2 examples/react/infinite-query-with-max-pages/package.json
  8. +2 −2 examples/react/load-more-infinite-scroll/package.json
  9. +2 −2 examples/react/nextjs-app-prefetching/package.json
  10. +3 −3 examples/react/nextjs-suspense-streaming/package.json
  11. +2 −2 examples/react/nextjs/package.json
  12. +3 −3 examples/react/offline/package.json
  13. +2 −2 examples/react/optimistic-updates-cache/package.json
  14. +2 −2 examples/react/optimistic-updates-ui/package.json
  15. +2 −2 examples/react/pagination/package.json
  16. +2 −2 examples/react/playground/package.json
  17. +2 −2 examples/react/prefetching/package.json
  18. +2 −2 examples/react/react-native/package.json
  19. +2 −2 examples/react/react-router/package.json
  20. +2 −2 examples/react/rick-morty/package.json
  21. +2 −2 examples/react/shadow-dom/package.json
  22. +2 −2 examples/react/simple/package.json
  23. +2 −2 examples/react/star-wars/package.json
  24. +2 −2 examples/react/suspense/package.json
  25. +1 −1 packages/react-query-devtools/package.json
  26. +1 −1 packages/react-query-next-experimental/package.json
  27. +1 −1 packages/react-query-persist-client/package.json
  28. +1 −1 packages/react-query/package.json
  29. +5 −2 packages/react-query/src/useBaseQuery.ts
  30. +59 −51 pnpm-lock.yaml
4 changes: 2 additions & 2 deletions examples/react/algolia/package.json
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@
"dependencies": {
"@algolia/client-search": "4.23.3",
"@algolia/transporter": "4.23.3",
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"algoliasearch": "4.23.3",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522"
4 changes: 2 additions & 2 deletions examples/react/auto-refetching/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"isomorphic-unfetch": "4.0.2",
"next": "^14.2.4",
4 changes: 2 additions & 2 deletions examples/react/basic-graphql-request/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"graphql": "^16.8.1",
"graphql-request": "^7.0.1",
"react": "19.0.0-rc-4c2e457c7c-20240522",
6 changes: 3 additions & 3 deletions examples/react/basic-typescript/package.json
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@
},
"dependencies": {
"@tanstack/query-sync-storage-persister": "^5.49.1",
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query-persist-client": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"@tanstack/react-query-persist-client": "^5.49.2",
"axios": "^1.6.8",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522"
4 changes: 2 additions & 2 deletions examples/react/basic/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522"
4 changes: 2 additions & 2 deletions examples/react/default-query-function/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522"
4 changes: 2 additions & 2 deletions examples/react/infinite-query-with-max-pages/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"isomorphic-unfetch": "4.0.2",
"next": "^14.2.4",
4 changes: 2 additions & 2 deletions examples/react/load-more-infinite-scroll/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"isomorphic-unfetch": "4.0.2",
"next": "^14.2.4",
4 changes: 2 additions & 2 deletions examples/react/nextjs-app-prefetching/package.json
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
"test:types": "tsc"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"next": "^15.0.0-rc.0",
"react": "^19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "^19.0.0-rc-4c2e457c7c-20240522"
6 changes: 3 additions & 3 deletions examples/react/nextjs-suspense-streaming/package.json
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@
"test:types": "tsc"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query-next-experimental": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"@tanstack/react-query-next-experimental": "^5.49.2",
"next": "^14.2.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
4 changes: 2 additions & 2 deletions examples/react/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"ky": "^1.2.4",
"next": "^14.2.4",
"react": "^18.2.0",
6 changes: 3 additions & 3 deletions examples/react/offline/package.json
Original file line number Diff line number Diff line change
@@ -10,9 +10,9 @@
"dependencies": {
"@tanstack/query-sync-storage-persister": "^5.49.1",
"@tanstack/react-location": "^3.7.4",
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query-persist-client": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"@tanstack/react-query-persist-client": "^5.49.2",
"ky": "^1.2.4",
"msw": "^2.3.0",
"react": "19.0.0-rc-4c2e457c7c-20240522",
4 changes: 2 additions & 2 deletions examples/react/optimistic-updates-cache/package.json
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
"test:types": "tsc"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"isomorphic-unfetch": "4.0.2",
"next": "^14.2.4",
4 changes: 2 additions & 2 deletions examples/react/optimistic-updates-ui/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"isomorphic-unfetch": "4.0.2",
"next": "^14.2.4",
4 changes: 2 additions & 2 deletions examples/react/pagination/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"isomorphic-unfetch": "4.0.2",
"next": "^14.2.4",
4 changes: 2 additions & 2 deletions examples/react/playground/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522"
},
4 changes: 2 additions & 2 deletions examples/react/prefetching/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"start": "next start"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"isomorphic-unfetch": "4.0.2",
"next": "^14.2.4",
4 changes: 2 additions & 2 deletions examples/react/react-native/package.json
Original file line number Diff line number Diff line change
@@ -14,8 +14,8 @@
"@react-native-community/netinfo": "^11.3.1",
"@react-navigation/native": "^6.1.6",
"@react-navigation/stack": "^6.3.16",
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"expo": "^51.0.8",
"expo-constants": "^16.0.1",
"expo-status-bar": "^1.12.1",
4 changes: 2 additions & 2 deletions examples/react/react-router/package.json
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
"test:types": "tsc"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"localforage": "^1.10.0",
"match-sorter": "^6.3.4",
"react": "19.0.0-rc-4c2e457c7c-20240522",
4 changes: 2 additions & 2 deletions examples/react/rick-morty/package.json
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@
"@emotion/styled": "^11.11.5",
"@mui/material": "^5.15.18",
"@mui/styles": "^5.15.18",
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522",
"react-router": "^6.23.1",
4 changes: 2 additions & 2 deletions examples/react/shadow-dom/package.json
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522"
},
4 changes: 2 additions & 2 deletions examples/react/simple/package.json
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522"
4 changes: 2 additions & 2 deletions examples/react/star-wars/package.json
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@
"@emotion/styled": "^11.11.5",
"@mui/material": "^5.15.18",
"@mui/styles": "^5.15.18",
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522",
"react-router": "^6.23.1",
4 changes: 2 additions & 2 deletions examples/react/suspense/package.json
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
"private": true,
"type": "module",
"dependencies": {
"@tanstack/react-query": "^5.49.1",
"@tanstack/react-query-devtools": "^5.49.1",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"axios": "^1.6.8",
"font-awesome": "^4.7.0",
"react": "19.0.0-rc-4c2e457c7c-20240522",
2 changes: 1 addition & 1 deletion packages/react-query-devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-query-devtools",
"version": "5.49.1",
"version": "5.49.2",
"description": "Developer tools to interact with and visualize the TanStack/react-query cache",
"author": "tannerlinsley",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/react-query-next-experimental/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-query-next-experimental",
"version": "5.49.1",
"version": "5.49.2",
"description": "Hydration utils for React Query in the NextJs app directory",
"author": "tannerlinsley",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/react-query-persist-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-query-persist-client",
"version": "5.49.1",
"version": "5.49.2",
"description": "React bindings to work with persisters in TanStack/react-query",
"author": "tannerlinsley",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/react-query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-query",
"version": "5.49.1",
"version": "5.49.2",
"description": "Hooks for managing, caching and syncing asynchronous and remote data in React",
"author": "tannerlinsley",
"license": "MIT",
7 changes: 5 additions & 2 deletions packages/react-query/src/useBaseQuery.ts
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ export function useBaseQuery<
const errorResetBoundary = useQueryErrorResetBoundary()
const defaultedOptions = client.defaultQueryOptions(options)

;(client.getDefaultOptions() as any)._experimental_beforeQuery?.(
;(client.getDefaultOptions().queries as any)?._experimental_beforeQuery?.(
defaultedOptions,
)

@@ -125,7 +125,10 @@ export function useBaseQuery<
throw result.error
}

;(client.getDefaultOptions() as any).afterQuery?.(defaultedOptions, result)
;(client.getDefaultOptions().queries as any)?._experimental_afterQuery?.(
defaultedOptions,
result,
)

// Handle result property usage tracking
return !defaultedOptions.notifyOnChangeProps
Loading