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
박우빈
b565098f4d
docs: request-waterfalls typos (#7918) 2024-08-19 10:37:16 +02:00
Jay
3292791219
docs: divided installation scripts (#7881) 2024-08-19 10:36:40 +02:00
Navin Khadka
1fc6124bfd
docs: Fix typo (#7865) 2024-08-07 16:16:17 +02:00
GwanSik Kim
075ba1c261
docs: add suspensive react query to community projects (#7846)
* docs: add react suspensive react query to community projects

Co-authored-by: Jonghyeon Ko <61593290+manudeli@users.noreply.github.com>

* docs: update suspensive react query link

---------

Co-authored-by: Jonghyeon Ko <61593290+manudeli@users.noreply.github.com>
2024-08-05 09:37:26 +02:00
dochi
d14e0060c8
docs(react-query):fix-missing-isServer-import (#7849) 2024-08-05 09:36:45 +02:00
Andre Sander
98d127adb8
docs: Update paginated-queries.md (#7759)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-07-18 14:50:17 +02:00
wing
0c671eecb7
fix(query-core): allow function value of notifyOnChangeProps query option to return undefined (#7441)
* fix(query-core): allow function value of `notifyOnChangeProps` query option to return `undefined`

`undefined` is a valid return value for the function value of `notifyOnChangeProps`. See linked issue for more details.

Fixes #7426.

* docs(react-query): update signature of `useQuery`'s `notifyOnChangeProps` option

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-07-18 08:52:20 +02:00
Robin Marillia
81ca333248
docs(query-core): add matchQuery and matchMutation utils (#7643)
* docs(query-core): add matchQuery and matchMutation mentions in filters documentation

* docs(query-core): clarifies filters type

* Format

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2024-07-18 11:03:34 +10:00
Ryan Miller
a1ce3c4ad7
docs: Update Streaming with Server Components docs to reflect correct usage (#7725)
* chore: update Streaming with Server Components docs to reflect correct usage

* chore: update Streaming with Server Components to show moving the getQueryClient function

* chore: fix prettier styling

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-07-17 11:53:10 +02:00
Dominik Dorfmeister
46359542f0 chore: prettier 2024-07-15 17:20:41 +02:00
Kier Borromeo
369d826066
docs: access latest data for useMutationState (#7738) 2024-07-15 16:15:02 +02:00
Alessia Bellisario
79e5202997
docs: Update comparison.md (#7703) 2024-07-11 14:20:14 +02:00
87xie
c107fc54a9
docs(react-query): correct links in the prefetching.md file (#7671)
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2024-07-08 12:17:57 +10:00
87xie
70c40e7876
docs(react-query): Correct links in usePrefetchQuery (#7658) 2024-07-03 18:54:56 +10:00
Julius Marminge
8cbe7d5dc1
feat(hydration): dehydrate.serialize and hydrate.deserialize (#7615)
* add transformData to restore resolved prefetches

* add failing test

* fix test

* remove transformPromise

* fix

* rev

* rm log

* fix test

* add another test

* serialize/deserialize

* chore: docs + minor refactor

* indentation

* chore: prettier

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-29 07:10:45 +02:00
Alexander Svendsen
87c8e01e4c
docs: remove suspense reference to useQuery (#7640)
useQuery has no suspense option
2024-06-28 14:41:20 +02:00
Kenrick Beckett
8b899410c8
docs: Remove the variable assignment from example code (#7623)
* Remove the variable assignment from example code

* remove variable assignment in prefetch query docs

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-27 14:48:18 +02:00
Igor Shevchenko
52cc7b2162
docs: typo (#7628) 2024-06-26 23:39:38 +02:00
John
31b9ab49af
feat(core): Add possibility to pass a callback to enabled. (#7566)
* Add possibility to pass a callback to enabled.

* Refactor into using the same pattern as resolving staletime, with the use of a resolveEnabled util function

* Update tests for enabled option as a callback

* update docs

* remove typo

* Update enabled type in docs

* remove duplicated test case

* Fix eslint errors

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: John Pettersson <john.pettersson@carnegie.se>
2024-06-25 16:10:16 +02:00
Dominik Dorfmeister
fbfe9409ca
feat(react-query): usePrefetchQuery (#7582)
* feat: usePrefetchQuery

* refactor: switch to actual prefetching

* refactor: remove ensureInfiniteQueryData function

will do in a separate PR

* chore: add tests for usePrefetchQuery and usePrefetchInfiniteQuery (#7586)

* chore: add tests for usePrefetchQuery and usePrefetchInfiniteQuery

* chore: update tests to assert the alternative spy is not called

* chore: add some new tests

* chore: remove it.only whoops

* chore: call mockClear after fetching

* chore: improve waterfall test by asserting fallback calls instead of loading node query

* chore: improve code repetition

* chore: add some generics to helper functions

* usePrefetchQuery type tests and docs (#7592)

* chore: add type tests and docs

* chore: update hooks to use FetchQueryOptions and FetchInfiniteQueryOptions

* chore: update tests

* chore: update docs

* chore: remove .md extension from link

* chore: add unknown default value to TQueryFnData

* Apply suggestions from code review

---------

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

* Apply suggestions from code review

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>

* chore: fix types in tests

* chore: add new tests (#7614)

* chore: add new tests

* Apply suggestions from code review

---------

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

---------

Co-authored-by: Bruno Lopes <88719327+brunolopesr@users.noreply.github.com>
Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
2024-06-25 14:25:28 +02:00
Dominik Dorfmeister
bda8a54ae0 chore: prettier 2024-06-19 08:40:56 +02:00
Natan Deitch
0ae229bba3
docs(react-query): queryFn must be a function calling (#7572)
* docs: queryFn must be a function calling

* Update docs/framework/react/guides/advanced-ssr.md
2024-06-18 14:55:38 +02:00
Paul Ashioya
8d69ef4940
docs: fix grammar mistake on migrating-to-v5.md (#7556)
Fixed grammar mistake on migrating-to-v5.md

Very small change but makes the documentation better than it already is
2024-06-15 20:33:31 +02:00
Julius Marminge
9a030b6408
feat: hydrate.transformPromise (#7538)
* hydrate.deserialize

* rm logs

* test

* commit what i got

* async await is king

* rev

* rev

* rm unused

* make thenable work

* comment usage

* docs

* simplify

* fix docs

* tsx

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

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

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-12 14:32:00 +02:00
MinhoPark
bd094f8ace
docs(advanced-ssr): delete unused import (#7553) 2024-06-11 16:35:04 +02:00
Dominik Dorfmeister
96a743eec7
feat(query-core): staleTime as a function (#7541)
* feat: staleTime as a function

* test: staleTime as a function

* refactor: types

* docs: staleTime as function
2024-06-11 15:11:40 +02:00
Mandeep56Singh
62841b6217
docs(installation):remove prompt symbol from installation commands(#7293) (#7540)
Installation commands for various framework includes prompt symbol.
On execution of same commands IDE throws error
as IDEs by default includes prompt symbol.
This commit resolve this issue
2024-06-10 07:01:06 +02:00
Joshua Rogan
40fcb54fa4
docs: Update migrating-to-v5.md (#7539)
* docs: Update migrating-to-v5.md

* docs: Update migrating-to-v5.md

* docs: Update migrating-to-v5.md
2024-06-09 17:11:25 +02:00
Luiz
f2db185dfb
docs: Update optimistic-updates.md (#7450)
Fixed code snippet to match explanation

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-08 19:41:38 +02:00
Hwang Taehwan
4e1a04b506
refactor(react-query-next-experimental): use isServer to determine server environment (#7536)
* docs: use isServer on ssr guides

* refactor: use isServer on nextjs examples

* refactor(react-query-next-experimental): use isServer instead of typeof window

* chore(docs): fix prettier

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-08 19:37:05 +02:00
Randall71
f8ce2ba7c1
docs: add Expo dev tools (#7461) 2024-06-08 19:30:13 +02:00
Minjee Son
96aa4617af
docs: update usePrefetchQuery to avoid infinite refetching (#7456)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-02 18:54:27 +02:00
Jason Rametta
eb2b469a91
docs: Update community-projects.md - Add Rapini (#7499)
* Update community-projects.md

* Alphabetical

* Prettier fix whitespace

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-06-02 10:35:40 +02:00
Dominik Dorfmeister
721730a6a9
feat: allow to dehydrate and restore promises (#7481)
* feat: allow to dehydrate and restore promises

* fix: retries with initialPromise, but without queryFn

* fix: retries for infinite queries

this could use some reconciliation

* refactor: streamline the way we get the queryFn between Query and InfiniteQuery

* fix: only dehydrate query.promise for pending queries

* feat: allow setting hydration and dehydration defaultOptions on the QueryClient

* test: global defaultOptions for hydrate / dehydrate

* tests: hydration of promises

* feat: next15 integration test

* docs: app directory prefetching example

* docs: global hydrate and dehydrate options

* feat: use streaming

* docs: prefetching

* test: useQuery with initialPromise

* fix: do not leak server errors to the client

* docs: typo

* fix: ignore next in sherif

because we test against multiple versions of next

* test: await promise before clearing client to avoid error

* feat: always respect the `promise` passed to hydrate, even if we already have a cached entry.

* Update docs/framework/react/guides/advanced-ssr.md

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>

* Update docs/framework/react/guides/advanced-ssr.md

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>

* chore: remove leftover 'use client'

* oops

* docs: better text

* chore: better error messages

* update note

* chore: fix lock file

---------

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
2024-05-27 20:13:24 +02:00
Jörg Bayreuther
aadb83122b
docs: update useSuspenseQuery error example (#7467) 2024-05-22 19:55:13 +02:00
Sergiy Dybskiy
308aa7eaa1
docs: Remove unused useState import from example (#7435) 2024-05-18 22:37:14 +10:00
John Dunn
02bf564780
docs: add react query rewind to community projects (#7437)
* added react query rewind to community projects

* update formatting

Co-authored-by: Austin Cavanagh <austin.cavanagh.cs@gmail.com>

* update formatting

Co-authored-by: Austin Cavanagh <austin.cavanagh.cs@gmail.com>

---------

Co-authored-by: Austin Cavanagh <austin.cavanagh.cs@gmail.com>
2024-05-16 11:59:13 +02:00
Joshua Samaniego
0e3972454b
docs: Update typo devtools.md (#7432) 2024-05-15 17:11:32 +02:00
polee
3a9e0461b0
docs: not using useState in creating queryClient when use ReactQueryStreamedHydration in suspense-example (#7431) 2024-05-15 16:09:08 +02:00
Tanner Linsley
10c7527898
Update overview.md 2024-05-14 15:56:17 -06:00
Jason Gerbes
8ce6642d12
feat(query-core): improve useInfiniteQuery error handling (#7418)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-05-12 16:12:33 +02:00
Damian Osipiuk
1839ff6855
docs: fix broken link (#7415) 2024-05-12 00:39:13 +02:00
Damian Osipiuk
fb91446857
docs(vue-query): add missing links and pages (#7414) 2024-05-12 00:31:28 +02:00
Dominik Dorfmeister
fbe3b4456e
fix: deprecate direction passed to QueryFunctionContext (#7410)
* fix: deprecate direction passed to QueryFunctionContext

* chore: fix type tests
2024-05-10 16:08:10 +02:00
Oc1S
0bb0fa397b
docs: Fix usage of removeEventListener (#7393) 2024-05-10 14:03:22 +02:00
pius712
ab126e867e
docs: fix typo (#7400) 2024-05-10 14:02:26 +02:00
Mackie Underdown
6768a9c723
docs(createSyncStoragePersister): fix typo (#7348) 2024-04-29 17:17:32 +02:00
Anton Jeppsson
2aca521a88
fix(codemods): Use .cjs extension for CommonJS files (#7333)
* bug(codemods): rename CommonJS files to .cjs

Rename CommonJS files in codemods to distinguish them from ES module
files otherwise used in this project.
Resolve an issue occuring since package.json in codemods is removed when
publishing causing module type data to be lost.

Fix issue #7154

* Fix knip errors

* Add file extension to tests

* Update migration doc

---------

Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2024-04-25 17:06:14 +10:00
Dominik Dorfmeister
f025a7c2e6 chore(docs): fix prettier 2024-04-23 09:09:48 +02:00
Kushagra Mehta
b92fb043af
docs: fix pages breaking due to diff in markdown (#7321) 2024-04-22 13:16:54 +02:00