0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
Commit graph

293 commits

Author SHA1 Message Date
Raj Suhail
4fb781feef
docs: Fix community resource links in important Defaults page. (#8697)
* Fix community resource links

* Fix all the remaning community links
2025-03-08 09:47:59 +01:00
Joseph Markus
67e52cf889
docs: Fix 404 link for Query Keys in useQuery.md (#8769)
Current link takes to https://tanstack.com/query/latest/docs/framework/guides/query-keys which is a 404
2025-03-07 19:19:55 +01:00
Sina Sepahvand
d85ee752a8
docs: Update ssr.md (#8770) 2025-03-07 19:19:35 +01:00
Ilia Evseev
a4f3956b91
docs: Fix relative links in Advanced Server Rendering guide (#8765) 2025-03-07 14:31:43 +11:00
JiSeong Park
e67b6f670c
docs: fix Advanced Server Rendering guide link (#8762) 2025-03-07 13:47:25 +11:00
Simon Schick
2d26374e46
docs: Fix links in caching.md (#8693)
It seems this document was moved without adjusting the paths.
2025-02-25 11:31:07 +01:00
Julius Marminge
6ca0eb776c
fix: no hydration when new promise comes in (#8383)
* add failing repro test

* update assertinos

* add logg

* ehm - maybe fix?

* rm -only

* make example

* upd

* ad debug logs

* more debugging

* push

* maybe???

* rm log

* revert

* fix: ?

* fix: check for pending status again

otherwise, we risk including promises that happen because of background updates (think persistQueryClient)

* fix: clear serverQueryClient between "requests"

otherwise, we are re-using the cache and the query won't be in "pending" state the second time around

* chore: remove logs

* rethrow next build error

* kick off ci again

* add `shouldRedactError` option

* pluralize

* docs

* chore: more memory

* chore: revert more memory

* don't compare statuses if they don't exist

* ci: apply automated fixes

* lint

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-17 13:52:17 +01:00
Alex Errant
bb25d06980
docs: better document throwOnError's default (#8581)
* better document `throwOnError`'s default

* delete unnecessary defaultOptions doc
2025-02-16 16:26:57 +01:00
Martijn Gribnau
b184cd5752
docs(react-native): fix typo (#8637) 2025-02-12 16:01:46 +01:00
Frederic R.
4621e5b6b1
docs(react-native): partial revert online manager usage (#8634)
introduced a regression in the doc with PR #8633
only expo network returns an object
NetInfo returns a function
mea culpa
2025-02-11 17:25:39 +01:00
Frederic R.
5bf569b1f3
docs(react-native): online manager usage change (#8633)
resolves #8631
2025-02-11 15:55:17 +01:00
Dominik Dorfmeister
f86eb7e099
feat(core): add client to queryFunctionContext (#8599)
* feat: add queryClient to queryFunctionContext

* fix: remove queryClient exception

closing over a queryClient should now error, as we pass the queryClient directly to the queryFunctionContext

* fix: persister

* refactor: keep private reference to cache

* chore: fix tests

* docs: QueryFunctionContext

* refactor: derive from private member

* refactor: name it `client`

* refactor: let's go with client

* chore: try skipping the cache

* chore: re-enable caching

and try to bust it by changing sharedGlobals lol
2025-01-31 10:02:56 +01:00
Alex Batalov
a507400307
docs: Add OpenAPI Qraft React to the list of community projects (#8588) 2025-01-29 13:32:24 +01:00
Oleksandr Danylchenko
d595e23679
docs: fix variables obtaining path (#8589) 2025-01-26 19:24:42 +01:00
Favour Ohanekwu
322760bf43
docs(framework): update Next.js and Svelte documentation links (#8572)
* docs(svelte): fix writable stores tutorial link

Update the Svelte stores tutorial link to the correct URL in the Svelte Query overview documentation.

The previous link to writable-stores was broken or outdated.

* docs(ssr): update Next.js documentation links to latest version

Update outdated Next.js documentation links in the SSR guide to point to
the latest App Router documentation paths, ensuring users are directed to
the most current and relevant documentation.

Links updated:
- rewrites feature
- automatic static optimization
- rewrite parameters
2025-01-23 17:50:04 +01:00
Paul Nodet
cd88c9cd64
docs: fix invalid openapi-react-query url (#8568) 2025-01-23 07:13:33 +01:00
Ruud Andriessen
397fcfc141
docs: prefer using satisfies instead of type cast in persistQueryClient docs (#8551) 2025-01-20 17:26:19 +01:00
Ciarán Curley
8ddebc6640
docs(react-query): highlight per component select pattern for query options (#8522)
* docs(react-query): per component select pattern

highlight per component select pattern for query options

* Update docs/framework/react/guides/query-options.md

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-01-11 19:55:57 +01:00
Neef Rehman
fd500a4078
feat(types): support typing QueryKey and MutationKey via Register (#8521)
* feat(types): support typing QueryKey and MutationKey via Register

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-10 16:47:08 +01:00
Przemek Maszczynski
690fd2ae08
docs(react-query): Add import statement with skipToken to the docs (#8519)
* docs(react-query): Add import statement with skipToken to the docs

Makes more obvious how should the skipToken be used

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-10 13:49:47 +01:00
Dominik Dorfmeister
e2bc2165fa
feat(react-query): allow useQuery and useQueries to unsubscribe from the query cache with an option (#8348)
* feat(react-query): allow useQuery and useQueries to unsubscribe from the query cache with an option

* test: subscribed

* fix: revert calling getOptimisticResult later

* docs(react): update the react-native.md section (#8506)

* update the doc

* update the doc

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>

* docs: reference

---------

Co-authored-by: Florian De la comble <f.delacomble@gmail.com>
2025-01-08 15:17:08 +01:00
Matt Tingen
3124193c08
docs: describe query default changes in v5 (#8488)
Fixes #8485
2025-01-03 15:21:03 +01:00
Pierre Spring
18d81b96d5
docs: Update infiniteQueryOptions.md (#8447)
Fix copy/pasted typo.
2024-12-23 14:42:36 +01:00
gnerkus
a76ac59e97
docs(useQuery): add more info to description of staleTime field of query options (#8448) 2024-12-18 10:13:29 +01:00
Alex Liu
4521a04a25
docs: use correct broadcastChannel default value and type name (#8436) 2024-12-16 16:14:41 +01:00
René Klomp
7f9f28eef2
docs: Removed unused notifyOnChangeProps prop (#8415) 2024-12-07 20:15:43 +01:00
Mohammed Elzanaty
bb31c47eb8
📝 docs(query): add link to infiniteQueryOptions reference (#8413) 2024-12-07 15:35:38 +01:00
최준영
665e747c6a
docs: Fix typo in useMutation.md (#8397)
Fix typo in useMutation.md
2024-12-07 09:00:19 +01:00
Daniel Reichhart
102b6a892d
docs(react-query): add example for Expo Network in online status management (#8298)
* docs: expo-network

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-22 19:32:19 +01:00
Ammar
fadfbde045
Update infinite-queries.md (#8302) 2024-11-18 18:22:25 +01:00
Arnoud
118b1522ef
docs(angular-query): add TypeScript documentation (#8296) 2024-11-15 18:35:16 +01:00
Ariel-Moroshko
7085bd11c0
docs: correct file extensions to .tsx and add type annotations (#8259)
* Fix typo: 'hydrate' to 'dehydrate' in documentation

* fix: correct file extensions to .tsx and add type annotations

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-08 14:07:07 +01:00
Artur Abdullin
aa92accdbd
docs(devtools): fix typo (#8248) 2024-11-04 07:38:47 +01:00
CarolineClr
92defc6e42
docs(community-projects): Add Atomic CRM to the list of community projects (#8229)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-11-03 11:55:23 +01:00
Uğurcan Emre Ataş
caf6556fce
chore(docs): update useQueryFocusAware docs (#8205)
* chore(docs): update react native useQueryFocusAware docs

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-23 15:29:30 +02:00
Ollie Chick
9d99fcb950
docs: Update disabling-queries.md (#8201) 2024-10-21 10:28:33 +02:00
Qiushi Yan
a2ea754e54
docs(react-query): fix prefetch with suspense example (#8193)
* docs: react prefetch with suspense example

* remove notifyOnChangeProps from usePrefetchQuery
2024-10-20 19:10:59 +02:00
Ariel-Moroshko
1980a11f91
docs: 'hydrate' to 'dehydrate' in documentation (#8190) 2024-10-16 14:50:54 +02:00
Jérémy Barbet
71c5f8801d
docs: sentence wording (#8106) 2024-10-01 20:09:09 +02:00
Sagar Ghimire
b6633831f0
docs: Update mutations.md (#8105) 2024-10-01 20:08:45 +02:00
Alex / KATT
18953be6f6
feat: add support for React.use() (#7988)
* let’s do it again

* fix test group

* maybe

* mkay

* cool

* rm console.logs

* mkay

* mkay

* fix(vue-query): invalidate queries immediately after calling `invalidateQueries` (#7930)

* fix(vue-query): invalidate queries immediately after call `invalidateQueries`

* chore: recovery code comments

* release: v5.53.2

* docs(vue-query): update SSR guide for nuxt2 (#8001)

* docs: update SSR guide for nuxt2

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* thenable

* mkay

* Update packages/react-query/src/__tests__/useQuery.test.tsx

* mkay

* mkay

* faster and more consistent

* mkay

* mkay

* mkay

* mkay

* mkay

* fix unhandled rejections

* more

* more

* mkay

* fix more

* fixy

* cool

* Update packages/react-query/package.json

* fix: track data property if `promise` is tracked

if users use the `promise` returned from useQuery, they are actually interested in the `data` it unwraps to. Since the promise doesn't change when data resolves, we would likely miss a re-render

* Revert "fix: track data property if `promise` is tracked"

This reverts commit d1184babd1.

* add test case that @tkdodo was concerned about

* tweak

* mkay

* add `useInfiniteQuery()` test

* consistent testing

* better test

* rm comment

* test resetting errror boundary

* better test

* cool

* cool

* more test

* mv cleanup

* mkay

* some more things

* add fixme

* fix types

* wat

* fixes

* revert

* fix

* colocating doesn’t workkk

* mkay

* mkay

* might work

* more test

* cool

* i don’t know hwat i’m doing

* mocky

* lint

* space

* rm log

* setIsServer

* mkay

* ffs

* remove unnecessary stufffff

* tweak more

* just naming and comments

* tweak

* fix: use fetchOptimistic util instead of observer.fetchOptimistic

* refactor: make sure to only trigger fetching during render if we really have no cache entry yet

* fix: move the `isNewCacheEntry` check before observer creation

* chore: avoid rect key warnings

* fix: add an `updateResult` for all observers to finalize currentThenable

* chore: logs during suspense errors

* fix: empty catch

* feature flag

* add comment

* simplify

* omit from suspense

* feat flag

* more tests

* test: scope experimental_promise to useQuery().promise tests

* refactor: rename to experimental_prefetchInRender

* test: more tests

* test: more cancelation

* fix cancellation

* make it work

* tweak comment

* Update packages/react-query/src/useBaseQuery.ts

* simplify code a bit

* Update packages/query-core/src/queryObserver.ts

* refactor: move experimental_prefetchInRender check until after the early bail-out

* fix: when cancelled, the promise should stay pending

* test: disabled case

* chore: no idea what's going on

* refactor: delete unnecessary check

* revert refactor i did for cancellation when we wanted it to `throw`

* add docs

* align

* tweak

* Update docs/reference/QueryClient.md

* Update docs/framework/react/reference/queryOptions.md

---------

Co-authored-by: Alex Liu <dsa1314@gmail.com>
Co-authored-by: Tanner Linsley <tannerlinsley@users.noreply.github.com>
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-10-01 17:39:37 +02:00
Morteza
9227fd3a6a
docs(react-query): fix a typo in guides/ssr.md (#8086) 2024-09-30 10:58:34 +02:00
lami (laurent lahmy)
c12587a19a
Update useQueries.md (#8097)
fix typo
2024-09-30 10:53:21 +02:00
baeharam
9da00d610a
docs(react-query): fix queryClient description of useMutation and use… (#8077)
* docs(react-query): fix queryClient description of useMutation and useQuery

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-09-21 15:52:41 +02:00
Ciarán Curley
9608f80056
docs(react-query): recommend against throwing errors in select (#8041)
Explaining why you should not thow errors in the select function

Closes #8039
2024-09-11 15:23:08 +02:00
Boby Tiwari
49bfe686da
docs: Update advanced-ssr.md (#8021)
typescript was yelling
2024-09-08 13:52:43 +02:00
Toofff
f8ad97355c
feat(react-query-dev-tools): Add ReactQueryDevToolsPanel support (#7788)
* feat(react-query-dev-tools): Add ReactQueryDevToolsPanel support

Devtools Embedded Support is finally here! 
Embedded Mode will embed the devtools as a regular component in your application. You can style it however you'd like after that!

---------

Co-authored-by: Aryan Deora <adeora@iu.edu>
2024-09-02 18:39:48 -04:00
Romain Trotard
804357b935
docs: Add known limitation about cancellation with suspense hooks (#7958)
* docs: Add known limitation about cancellation with suspense hooks

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-27 18:23:55 +02:00
Lanre Adelowo
639363c769
docs: make copyable example useful by default (#7928)
When copying the command, the $ appears in the copied text which makes a tiny text processing required - i.e removing the prefix. Instead of being able to just paste in a terminal and get going.

This mimics the behaviour of all commands everywhere else in the docs I could find. e.g https://tanstack.com/query/latest/docs/framework/react/installation
2024-08-21 13:18:15 +02:00
autofix-ci[bot]
04c977b72f
ci: apply automated fixes 2024-08-19 08:38:52 +00:00