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
redirect if user exists
Undoable Mutations
mutate() runs. Here's a summary of what I want to happen after running mutate():
1. Do an Optimistic Update.
2. Run onSuccess and onSettled callbacks.
3. Show a notification with an undo button for 3 seconds. If the undo button is clicked, reverse the Optimistic Update and cancel the mutation.
4. After 3 seconds, if the undo button wasn't clicked, run the mutationFn....useQuery data on refetch
useQuery do a deep comparison (or something similar) before updating/reassigning the data attribute?
for example if I do:
```jsx...Invalid sorting
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?
Running multiple queries based on search params
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?