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
Creating a mutation.

Handling complex component reuse, but with different api requests
Invalidate API Gateway Cache when running manual invalidations
GET endpoint that I consume with react-query. I also use mutations when I want to perform a PUT request, and then I invalidate react-query cache for the proper key.
But I also need to tell API Gateway that I need fresh data, not data from API Gateway cache, and the way to do that is by using the header Cache-Control: max-age=0, is there an easy way to run the query function with those headers, but only for the manual invalidations?...Best way to use Query with search?
How is the best way to handle this with deconstructing and Select?
``export default function useAuth() {
return useQuery({
queryKey: ['auth'],
queryFn: async () => {
const response = await fetch(url`);...Why mutation queries are falling into 'success' instead of 'onError'?
Proper types for custom query hook
Prevent nested requests using setQueryData
queryClient.setQueryData(userKey, user)
And I don't expect additional requests in nested components which included useUserQuery with same key. But nested components send another request.
Hot to prevent it? Do I do something wrong?
I would like to combine two custom hook with query (login and fetching user) but I don't know how. That's why I put cache manually....Uncaught Error: No QueryClient set, use QueryClientProvider to set one

query client declaration
how to handle lists
getAllTodos.
Inside this list, I would like to be able to update a single Todo, from a mutation that calls updateSingleTodo, while also optimistically updating the Todo item in the list.
When I call queryClient.setQueryData(['todos', { id: 5 }], newTodo), does React Query automatically know what Todo to update in the list of Todos?
Or will I need to optimistically update the entire list of todos by replacing a single todo in that list? ...Local State Storage Does this make sense?
Data is not updating after calling refetch

Typescript - pass queryOptions in custom hook to useQuery
useMutation with action in React Router v6
Examples are all empty

My function is not running completely. It's not running as expected
How to stop a certain key from being stored in async storage?
cacheTime and staleTime as 0 but I can still see it in the cache.
My use case is pretty weird. I have react-query in a chrome extension (if you are unfamiliar, think react-native application). I have the network requests cached to the async storage so that the values I want are available offline....All useQuery data is undefined...
How can I implement clean architecture principles in FE using tanstack-query (react-query) ?