react-query-questions
solid-query-questions
table-questions
virtual-questions
router-questions
react-charts-questions
ranger-questions
vue-query-questions
svelte-query-questions
bling-questions
form-questions
angular-query-questions
start-questions
db-questions
start-showcase
router-showcase
📣-announcements
invalidateQueries or refetch is not working on delete and put request.
204s - Null Or Undefined
i.e should the type be ResponseObject | undefined or ResponseObject | null. return res?.data or return res?.data ?? null...
[resolved] does fetchquery deduplicate if there's no useQuery?
The difference between using fetchQuery and setQueryData is that fetchQuery is async and will ensure that duplicate requests for this query are not created with useQuery instances for the same query are rendered while the data is fetching.What if there is never a subscription created by useQuery, I only use fetchQuery? dedpulication does not appear to be occurring. im on "@tanstack/react-query": "4.14.3" edit: nevermind, deduplication is occurring, I simply had a query outside of
fetchQuery
on accident....How to update the state of a paged query manually?
onSuccess
to do this? how do I prevent the default append that RQ does on response?
Example:
```ts
const response = ['dog', 'cat', 'bird', /* new type / 'car', 'truck', 'ship', / new type */ 'apple', 'orange', 'lemon']...Should I include count/skip parameters in the query key for infinite queries?
count
(page size) and skip
. Should either of these parameters be included in the query key for an infinite query?
I've noticed in the docs, the cursor
parameter (analogous to skip) is never included in the query key.
* Not including cursor makes sense to me, as all the state regarding the current and initial page is encoded in RQ (page param). Combined with pageParam, we have everything we need to fetch next/previous page without encoding it in the query key
* however, I'm not sure about if I should include count
in the query key. For example, suppose we have one part of the app that only fetches 50 items with infinite scroll, vs another part that fetches 100 items without infinite scroll. It seems in this case we should encode the count into the query key...Initializing QueryClient in a top level component using useState instead of Global Variable
What framework is recommended for creating types schemas and hooks from OpenAPI 3.0/Swagger specs
useMutation issue with touch events
useMutation optimization question

Any alternatives to Netinfo for RN?
TanStack Query if I need session in call?
Preferred way of organizing mutations in v5
query.data with initial value returns undefined
Can I set the amount of scrolling that triggers the next page for an infinite query?
Percentage of Completion of React Query.
query when filters change, but keep the current results until new data is loaded
How to 'select' data from the cache? (read-only in a reactive way)
useQuery
call sit at the top of the component hierarchy. This query is responsible for fetching the data (enabled
is true
).
- have multiple useQuery
calls with { enabled: false }
in child nodes so we can read only from the cache and not trigger any refetches....Reset gcTime
gcTime
to something too long or to infinity
, is there a way I can reset gcTime
during onSucess
of my mutation? The useQueryClient
hook is called by the onSucces
handler. Thanks!Cannot update a component (Router) while rendering a different component
useEffect
for fetching data and use useQuery
instead?
So I created a server action that will get id from URL and then pass it as a queryFn
, but then, I get this error
```...