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
Programmatically set error on query with query client
queryClient.setQueryData. Is it possible to set the error for a query? I can't seem to find the appropriate API to do that.
As context: I've created a live query framework on top of React Query that fetches initial data while subscribing to updates via websockets. When websocket updates come in, the query cache is updated with queryClient.setQueryData. However, it's possible for websocket updates to return errors after the initial data is returned. I would love to be able to rely on React Query for handling these errors, but I don't know of a way to tell React Query that there is an error aside from throwing an error in the query function, which would be complicated to do in this circumstance....Using next Router with useQuery
React query devtools is empty despite having a successfully query

useQuery with onSubmit
React Query with SSR(NextJS V12) Api Calling Issue.
getInitialProps to fetch my data. And after fetching I am dehydrating the data, it is working fine as expected. But the issue is when I am doing Client side navigation, my Api calling is happening (from useQuery). But if I enable shallow routing then the API calling is not happening. Now how can I disable API calling without using shallow ?
PS: I've already tried some solution from https://github.com/vercel/next.js/discussions/19611.` if (typeof window !== 'undefined') {...
Refetch is not happening (dependent query)

How to handle error from useMutation
Why am I getting unhandled errors using useQuery?

useQuery with POST and body
How can i assure to typescript the argument type of useMutation ?
posts
```export const useMutatePost = (type: "create" | "update" | "delete") => {
const queryClient = useQueryClient();
switch (type) {...Why is refetch not being called?
refetch to make the request again.
Depending on the user's device, getting the location may be very fast, less than 1 second, and then react query is dropping is dropping the refetch. I guess it is dropping it because not enough time passed from the first request?
How can I tell react-query: trust me. I know what I am doing and make the request regardless how much time passed. I also want stale time to be infinity.
...How to reflect mutation post in the actual (fetch) data?
react-query, and I am pretty impressed with the results I've achieved so far. However I am with a problem:
I have the following useQuery:
```jsx
const {data: categories, isLoading: isCategoriesLoading, setData: setCategoriesData} = useQuery(...How can I use MutationCache to get the mutation result on different route?
quearyKey type issue

Managing case when query is dependent on nextjs router.query but should update conditionally
router.query and not change if react.query.isTab is the same. It is a true false value, Currently whenever I click on any Tab in as shown in SS1 the nav bar is lost because mesages from that channels are fetched, I need to maintain some sort of state say react.query.isTab so that the nav bar data doesnt update if users is switching between the tabs. It should only update if users search for a new query,
Getting undefined from fetched data on 1st onChange event from an input, don't know why.
Understanding SSR & persisting query cache
query Auth check combined with Mocks
result in a Context.
In the same page i am able to set Context Auth value to true if mock_mode is on....How do I prefetch the pageProps.json dehydration request?
.../pageName.json?query=xxx which returns the props in getServerSideProps.
Question: But the request takes some time to finish, and makes the navigation not smooth. Is there any way to prefetch the pageProps request so that the navigation can be more smooth?
Thank you in advance....