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

5,040 commits

Author SHA1 Message Date
Víctor Fernández de Alba
f819674a69
Revert "docs(react): Fix SSR custom framework guide - should be deconstructed (#4998)" (#5002)
This reverts commit aa94a946c2.
2023-02-19 06:52:18 +01:00
Eng Zer Jun
e5a7cf805f
docs: fix invalid React Router comparison link (#5000)
At the time of making this commit, React Router still does not have an
offical comparison page in their docs.

Reference: https://reactrouter.com/en/6.8.1

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-02-18 21:52:48 +01:00
Prateek Surana
8e7a316c11
Set fetchStatus to idle when dehydrating (#4974)
* 🐛 Set fetchStatus to idle when dehydrating

* ✅ Add a test case for ensuring fetchStatus is idle

* ✅ Update tests

* 🚨 Fix lint warnings

* ✅ Update fetchStatus when hydrating

* :okay_hand: Review updates

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-02-18 12:23:57 +01:00
Tanner Linsley
f14590b88b release: v4.24.9 2023-02-18 11:10:50 +00:00
Maciej Janawa
b32da31e38
perf(persist): subscriber calls persistQueryClientStore only on cache-related events (#4884) v4.24.9
* perf(persist): subscriber calls persistQueryClientStore only on cache related events

* refactor(persist): extract NotifyEvent type shared between query and mutation cache

* refactor(persist): move cacheableEventTypes declaration outside the function

* test(persist): add test checking `persistClient` calls frequency

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-02-18 12:05:41 +01:00
Víctor Fernández de Alba
aa94a946c2
docs(react): Fix SSR custom framework guide - should be deconstructed (#4998) 2023-02-18 11:50:48 +01:00
Tanner Linsley
4bdddf45fa release: v4.24.8 2023-02-14 20:41:30 +00:00
Eliya Cohen
da9620f1ba
fix(eslint-plugin-query): autofix for useMutation with options (#4986) v4.24.8
* fix autofix on usemutation with options

* format
2023-02-14 21:36:44 +01:00
Arnaud
1a38d17710
examples(react): Algolia search example (#4971)
* docs: example: algolia

* fix: remove empty line if desc is null

* fix: stale time value

* refactor: use vite and examples structure

* fix: remove deprecated doc files

* docs: add algolia example in the config.json
2023-02-12 21:37:17 +01:00
Tanner Linsley
21439e6ba9 release: v4.24.7 2023-02-12 09:29:38 +00:00
Eliya Cohen
48e806b89b
fix(eslint-plugin-query): mutation function is turned into mutation key (#4973) v4.24.7 2023-02-12 10:25:00 +01:00
Tanner Linsley
5a5fd6baef release: v4.24.6 2023-02-12 09:03:58 +00:00
Dominik Dorfmeister
1ef2958113
fix(core): make sure pausedMutations always execute in serial (#4906) v4.24.6
* fix: make sure pausedMutations always execute in serial

when resumePausedMutations is called multiple times, we are starting the second paused mutation even though the first one has not yet finished. This can happen when a focus event and an online event happen in short succession

* fix: always return the same Promise when resumePausedMutations is called

* fix: make sure every call to resumePausedMutations is evaluated

mutation.continue() needs to immediately resolve back if we didn't really continue so that consecutive calls to resumePausedMutations can be appended to the promise chain

* fix: types
2023-02-12 09:57:42 +01:00
Damian Osipiuk
02852dd6b3
chore: fix ci warnings (#4940) 2023-02-11 00:03:28 +01:00
寻
6a8471cf51
docs: typo fix (#4917) 2023-02-10 23:03:23 +01:00
Tanner Linsley
512d059a03
Update overview.md 2023-02-04 13:51:23 -07:00
Tanner Linsley
2b0caebc80 release: v4.24.5 2023-02-03 17:53:59 +00:00
Eliya Cohen
edeb96c088
fix(eslint-plugin-query): don't remove options passed as variable (#4932) v4.24.5 2023-02-03 18:48:26 +01:00
Michał Jung
3d83cfc16e
docs(useQuery.md): add missing isInitialLoading as possible return (#4923) 2023-02-02 10:50:49 +01:00
Tanner Linsley
7515e19877 release: v4.24.4 2023-01-30 16:59:42 +00:00
Dominik Dorfmeister
6b5bcbcf39
fix: Revert "fix(core): make sure pausedMutations always execute in serial (#4902)" (#4905) v4.24.4
This reverts commit 8991d7c019.
2023-01-30 17:49:22 +01:00
Tanner Linsley
de45e772f8 release: v4.24.3 2023-01-30 14:48:07 +00:00
Dominik Dorfmeister
8991d7c019
fix(core): make sure pausedMutations always execute in serial (#4902) v4.24.3
* fix: make sure pausedMutations always execute in serial

when resumePausedMutations is called multiple times, we are starting the second paused mutation even though the first one has not yet finished. This can happen when a focus event and an online event happen in short succession

* fix: always return the same Promise when resumePausedMutations is called
2023-01-30 15:42:36 +01:00
Tanner Linsley
65cd5968be release: v4.24.2 2023-01-30 09:53:49 +00:00
Adrien
64dc3afc73
fix(query-persist-client-core): Move query-core to dependencies (#4899) v4.24.2
Co-authored-by: Adrien Cohen <adrien@eshot.io>
2023-01-30 10:47:20 +01:00
Dominik Dorfmeister
1615509973
fix(core): make sure queries that never fetched can be garbage collected (#4898)
* fix(core): make sure queries that never fetched can ge garbage collected

This is important if data comes into the cache via a non-fetching method (like setQueryData or hydration) AND there is no active observer for them. Without this, they would never be gc'ed, but they should be after the default cacheTime

* tests: simplify svelte test
2023-01-30 10:43:11 +01:00
Steffen Holanger
2861488ee4
docs(createAsyncStoragePersister): Update documentation to match type (#4900)
* Update documentation to match type

There was a mismatch between the type declaration and the documentation.

* fix formating
2023-01-30 10:20:29 +01:00
Dominik Dorfmeister
7a62494628 chore: only run ci.yml on main branch
because we run a separate pr.yml for PRs and the previous check didn't really work
2023-01-30 09:11:47 +01:00
Dominik Dorfmeister
a9ba13503a chore: fix broken package.json 2023-01-30 08:54:18 +01:00
Dominik Dorfmeister
d37e64ec84 chore: upload code-coverage during build process
by decoupling test running from publishing; we now always run the tests when pushed to main
this should help us get a correct baseline
2023-01-30 08:52:22 +01:00
Tanner Linsley
aa97c2b2f2 release: v4.24.1 2023-01-29 17:20:36 +00:00
Lachlan Collins
1bf0835863
fix(svelte-query): Fix createQueries result type (#4877) v4.24.1
* fix(svelte-query): Fix createQueries result type

* Fix prettier

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-29 18:15:55 +01:00
Tanner Linsley
1afa0b4a3c release: v4.24.0 2023-01-28 06:55:31 +00:00
Eliya Cohen
13f53470e7
feat(eslint-plugin): support query key factory (#4879) v4.24.0
* add support for queryKeyFactories

* add test

* lint fix

* format

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-28 07:51:02 +01:00
Eliya Cohen
d4fa2b98cf
feat(eslint-plugin): prefer-object-syntax support useMutation and createMutation (#4893)
* support useMutation and createMutation

* fix tests

* format
2023-01-27 20:05:54 +01:00
Dominik Dorfmeister
9c15b327df
chore: fix ci-v3 2023-01-25 20:37:50 +01:00
Tanner Linsley
9a7f66f986 Update ci-v3.yml 2023-01-25 12:31:45 -07:00
Rendani Gangazhe
9404df4c4c
docs(svelte-query): Correctly type layout data when using prefetchQuery (#4852) 2023-01-25 08:19:10 +01:00
Niko Mendo
68c3e19bca
docs: Fix variable reference issue on sveltekit doc (#4861) 2023-01-25 08:18:49 +01:00
Eric Filion
b9cb5f1464
docs(ssr): add experimental app directory guide (#4568)
* docs(ssr): add experimental app directory guide

* fixup: consistent code formatting

* Revert "docs(ssr): add experimental app directory guide"

This reverts commits:
f6ef0164d6
5c48c7cffe

* [draft]: add experimental app directory guide

* fixup: drop dehydrate options

* fixup: layout.jsx consistent with create-next-app

* fixup: note on using query-core vs react-query

* docs(ssr): remove HydrateOnClient

* docs(ssr): rewrite suspense and server-side fetching section

* docs(ssr): tweaks

* docs(ssr): prettier

* docs: replace query-core imports with react-query imports

Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-25 08:18:20 +01:00
Tanner Linsley
53204fead5 release: v4.23.0 2023-01-24 10:58:19 +00:00
Girish Sontakke
f57c8dc15e
feat(client components): add use client directive at the top of files having client components (#4738) v4.23.0
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: Fredrik Höglund <fredrik.hoglund@gmail.com>
2023-01-24 11:52:11 +01:00
Dominik Dorfmeister
ea673770c0
docs: add readme.md to react adapter 2023-01-23 16:31:16 +01:00
Joël Kuijper
69a7d72d34
docs: add QueryClient import (#4856) 2023-01-23 13:08:09 +01:00
Qz
4ac7c1a8b6
docs(useMutation): correct docs for mutate function callbacks (#4601)
* docs(useMutation): correct docs for mutate function callbacks

* docs: fix merge conflicts

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-23 07:57:19 +01:00
Tanner Linsley
81baae3088 release: v4.22.4 2023-01-22 16:01:51 +00:00
Jan
901e826f39
fix(core): do not call mutate callbacks if mutation started after unmount (#4848) v4.22.4
* test: add mutation callback after unmount test

* test: make test more resilient

* fix(core): do not call mutate callbacks if mutation started after unmount

* test: adapt tests to what we have in v5

- one test has been removed (because setState was removed entirely)
- the second test has been re-written to not use internals anymore, and it works in v4 as well

* fix(core): do not call mutate callbacks if mutation started after unmount

by making sure the callbacks are only invoked if we have an active listener

* chore: prettier again

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-22 16:56:54 +01:00
Tanner Linsley
bae03c00b4 release: v4.22.3 2023-01-21 14:59:00 +00:00
Lachlan Collins
4f515dec96
fix(svelte-query): Fix createMutation for functions that take no arguments (#4847) v4.22.3
* Update createMutation test function name

* Default TVariables = void

* Fix createMutation test

* Fix prettier
2023-01-21 15:53:42 +01:00
Louis Young
61c3d94a94
docs(useMutation): clarify mutationFn option default (#4837)
* docs(useMutation): clarify `mutationFn` option default

* Make optionality consistent with `useQuery` documentation

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

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-20 13:24:26 +01:00