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

5,194 commits

Author SHA1 Message Date
Tanner Linsley
118801df34 release: v4.32.0 v4.32.0 2023-07-21 09:29:19 +00:00
Mateusz Burzyński
456e5eeff4
feat(types): cheaper WithRequired (#4922)
* feat(types): cheaper `WithRequired`

* fix(types): intersect with `{}` (`NonNullable`-style) instead of `unknown` in `WithRequired`

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-07-21 11:21:47 +02:00
Tanner Linsley
684ed14693 release: v4.31.0 v4.31.0 2023-07-21 08:50:58 +00:00
frederikhors
815cb7d819
feat(svelte-query): Export context functions (#5754)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-07-21 18:48:21 +10:00
Tanner Linsley
f64199d616 release: v4.30.0 v4.30.0 2023-07-21 08:33:04 +00:00
Paulo Marcos
74f2e28812
feat: add new function type to notifyOnChangeProps (#5734)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-07-21 10:27:40 +02:00
Jonghyeon Ko
10e03a53d0
docs: update readme about suspense (#5742)
* docs: update readme about suspense

* docs: code reviewed
2023-07-21 09:49:00 +02:00
Dale Seo
c3c5b32c56
docs: Update the repo url in the example code (#5746) 2023-07-20 08:57:08 +02:00
Andrew
8c967c73d6
docs: fix visible comment in query-keys.md (#5736)
* Docs: fix visible comment in query-keys.md

* Docs: (minor) Remove unnecessary parentheses from query-keys.md
2023-07-18 17:00:23 +02:00
Andrew
18ba7c0c3f
docs(query-keys): clarify query key refetching (#5653)
* docs(query-keys): clarify query key refetching 

Update the query-key documentation to note that changing data included in a query key will automatically refetch the query data.

It took me a long time to find this information, and I expected to find it here. I consulted with another engineer on our team, and they agreed that they would expect to see it stated more clearly here. So we felt this addition would be helpful.

* Update docs/react/guides/query-keys.md

* Update docs/react/guides/query-keys.md

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-07-17 15:18:04 +02:00
Lachlan Collins
e91f7514a6
docs: Use svelte for prismjs codeblocks (#5727) 2023-07-17 15:22:01 +10:00
Tanner Linsley
5314cfba1b release: v4.29.25 v4.29.25 2023-07-16 04:57:16 +00:00
Lachlan Collins
9c721e548f
refactor: Sort imports with eslint (#5634) 2023-07-16 14:51:42 +10:00
Lachlan Collins
8f19f73585
Update nx-cloud (#5721) 2023-07-16 11:56:09 +10:00
Tanner Linsley
b943d79183 release: v4.29.24 v4.29.24 2023-07-15 09:49:13 +00:00
Lachlan Collins
023de41c70
fix(svelte-query): Mark svelte v4 as supported (#5716) 2023-07-15 19:46:45 +10:00
shiwoo.park
8e91b93ff3
docs(ssr): Updated note about TS error with async server components (#5670)
This issue has been fixed now in https://github.com/vercel/next.js/pull/50557
2023-07-14 19:39:13 +02:00
Tanner Linsley
bbdf720e3f release: v4.29.23 v4.29.23 2023-07-14 14:51:22 +00:00
Dominik Dorfmeister
5322ede0a4
fix(core): onlineManager and focusManager should invoke listeners when a change occurred (#5713)
This is only relevant when a custom online / focus boolean has been set; in those cases, we previously only informed listeners if the value was truthy, but not if it changed back to false or undefined again

With this fix, the managers inform the listeners whenever something has changed, regardless of which direction the change was
2023-07-14 16:44:27 +02:00
Tanner Linsley
c331b1f57a release: v4.29.22 v4.29.22 2023-07-14 14:35:46 +00:00
EL AYADI Mohamed
15dceab332
fix(core): Assign observer's current Result when optimistic read occurs (#5573)
* [Fix-5538]: Assign observer's current Result when an optimistic reading occurs

* move the condition outside so would make making decision about v4 and v5 easier & remove fake timers

* Flip test on currentResult with placeholderData's order & add test for placeholderData

* Fix tests using the same queryKey

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-07-14 16:29:37 +02:00
Tanner Linsley
38ef67a3e5 release: v4.29.21 v4.29.21 2023-07-14 13:24:37 +00:00
Yuki Tanaka
38504ace8d
fix(vue-query): show timeline events in the Vue.js devtools (#5712) 2023-07-14 15:22:08 +02:00
Dominik Dorfmeister
58573e9a1c docs: fix typo 2023-07-14 12:19:58 +02:00
Matt Crowder
0f237bcbbd
docs: Update useMutation.md to remove mention of devtools with mutationKey (#5709)
As part of https://tanstack.com/query/v4/docs/react/devtools it mentions that mutations don't appear in the devtools, so we should remove this mention that the mutationKey is used in devtools
2023-07-14 12:10:18 +02:00
Dominik Dorfmeister
c3691691d5 docs: infinite query example
to only keep the first page
2023-07-14 12:09:00 +02:00
Em Zhan
f76783ca71
docs(vue-query): fix some typos in devtools.md (#5706) 2023-07-14 11:46:03 +02:00
Lachlan Collins
b18426da86
chore: Update to Nx 16.5.0 (#5686) 2023-07-06 22:47:24 +02:00
Tanner Linsley
3e2679f2a6 release: v4.29.20 v4.29.20 2023-06-30 22:15:46 +00:00
Alex Liu
634b397130
refactor(vue-query): reduce redundant ref() (#5639)
* refactor(vue-query): reduce redundant `ref()`

* chore: run prettier
2023-07-01 00:13:14 +02:00
Tanner Linsley
9b48048a61 release: v4.29.19 v4.29.19 2023-06-27 13:08:12 +00:00
Mike Lyons
390e47bd3e
fix(types): Add pageParam type to QueryFunction generic types (#5623)
Although QueryFunctionContext allows setting the pageParam type
through generics, QueryFunction uses QueryFunctionContext without
exposing this typing functionality. This forces any queryFn
typed as a QueryFunction to have an `any` pageParam. This change adds
TPageParam to QueryFunction type, which is passed through to
QueryFunctionContext.

This should be backward compatible and only affects typing (not runtime code).

Co-authored-by: Mike Lyons <mike@dropbox.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-06-27 15:02:31 +02:00
Lachlan Collins
ddf698604c
chore: Update eslint config from alpha branch (#5632) 2023-06-27 18:52:03 +10:00
Tanner Linsley
d0388a92dc release: v4.29.18 v4.29.18 2023-06-27 07:06:10 +00:00
Dominik Dorfmeister
1c46228fa2
fix: Revert "refactor(rect-query): prefer client-only import over 'use client' (#5626)" (#5630)
This reverts commit 3e25f51d0e.
2023-06-27 09:04:01 +02:00
Damian Osipiuk
3e82c581da
Revert "fix(vue-query): do not subscribe on server - nuxt2 memory leak fix (#5576)" (#5627)
This reverts commit f16e413a8f.
2023-06-25 17:58:04 +02:00
Tanner Linsley
e1abd07bc0 release: v4.29.17 v4.29.17 2023-06-25 14:34:18 +00:00
GLabat
9077bb9642
refactor(query): add more context to "Missing queryFn" error (#5620)
* refactor(query): add more context to "Missing queryFn" error

* refactor(query): use queryHash in error message for serialisation concern

---------

Co-authored-by: Guillaume Labat <guillaume.labat+git@imagino.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-06-25 16:28:11 +02:00
Tanner Linsley
6dc8d2ef09 release: v4.29.16 v4.29.16 2023-06-25 14:22:00 +00:00
Dominik Dorfmeister
3e25f51d0e
refactor(rect-query): prefer client-only import over 'use client' (#5626)
* refactor(rect-query): prefer client-only import over 'use client'

for things that cannot work on the server, like the QueryClientProvider or the hooks; this will give better error message when attempted to be used in a server component

* chore: update rollup-plugin-preserve-directives to 0.2.0
2023-06-25 16:19:15 +02:00
Tanner Linsley
3643b87c34 release: v4.29.15 v4.29.15 2023-06-20 16:53:57 +00:00
Indrajeet Nikam
c2d07d49c8
refactor(types): export query-cache related types (#5614)
* refactor(types): export query-cache related types

export queryCache related types for better DevX

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

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-06-20 18:48:04 +02:00
CertainlyAria
28a96c772e
docs(useMutation): fix incorrect mutationKey types (#5602) 2023-06-18 18:33:00 +02:00
Rudra Kishore G
ab8dd555da
docs(examples): Update useAppState in react-native example (#5557)
* Update useAppState.ts

Updating the cleanup function as the removeEventLister method is not available on AppState

* Update useAppState.ts

Removed Semicolons

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-06-18 18:32:10 +02:00
Tanner Linsley
accecddd16 release: v4.29.14 v4.29.14 2023-06-16 09:24:23 +00:00
Julian Bovone
74a0322853
fix(types): notifyManager method typedef (#5569)
Co-authored-by: jbovone <bovonejulian@gmail.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-06-16 11:18:13 +02:00
Lachlan Collins
df37d35609
chore: Reorder and rename config files (#5579) 2023-06-14 13:04:48 +10:00
Tanner Linsley
61bc58de90 release: v4.29.13 v4.29.13 2023-06-13 21:02:22 +00:00
Damian Osipiuk
f16e413a8f
fix(vue-query): do not subscribe on server - nuxt2 memory leak fix (#5576) 2023-06-13 22:59:21 +02:00
Jonghyeon Ko
18c9f77a4f
docs(@suspensive/react-query): update latest content (#5539) 2023-06-12 10:49:42 +02:00