Skip to main content
0 votes
1 answer
44 views

Vue components keep the old state even when replaced

const queryKey = ref("userData"); const { data, isLoading, error } = useQuery({ queryKey: [queryKey], // Chave única para identificar a consulta queryFn: async () => { ...
rodrigo's user avatar
0 votes
0 answers
35 views

How to mock Axios error response when using VueQuery

I am implementing VueQuery in my application. Now I am trying to write unit tests for this. The success case works fine, but when I mock an error case it seems to error is not being handled by ...
Ricardo de Vries's user avatar
0 votes
0 answers
51 views

Tanstack vue query dont apply after updated

I use vue and @tanstack/vue-query. it is my code: <a-select v-model="selectedPersonId" @search="handleSearch" @change="selectPerson" show-search ...
bego's user avatar
  • 23
1 vote
0 answers
557 views

Tanstack query refetch interval dynamic change

I am working with vue-query (but I guess the answer for my question would also be complied with react query) with the call to API, in which I have a button to select between auto-refetch and manual ...
Jaisy's user avatar
  • 35
0 votes
0 answers
117 views

Update data after query fetching on success with vue query v5

I am using @tanstack/vue-query package, and I am not sure how to update data after the query fetching is completed successfully. I can write data update logic in query function but I want to extract ...
Phyo Thiha's user avatar
0 votes
1 answer
3k views

PrimeVue DataTable Virtual Scroller Resetting Scroll position on data change

I'm having an issue where the scroll position resets on the data table but not on the virtual scroller component. Every time you scroll to the fetchNextPage threshold, it resets the scroll position to ...
snoop's user avatar
  • 459
0 votes
1 answer
557 views

Prevent reload straight after saving using vue-query and invalidateQueries()

I have this component in Vue. When I save, the server is returning the updated record. So, I don't need to hit the server with yet another request. However, this is triggering the new get: queryClient....
Merc's user avatar
  • 17.2k
1 vote
1 answer
1k views

Updating Ref not Triggering Composable Recomputation

I am trying to update a ref object that should trigger the data fetching logic written to return updated data. But this doesn't seem to be working. App.vue <script setup lang="ts"> ...
Nauman Zafar's user avatar
  • 1,103
0 votes
1 answer
195 views

is there any way to access property from data() inside setup()?

I'm making app in Vue.js 2.6.14. I use vue-query to fetch data from external API. I wanted to pass an argument - this.form.style to the query function, inside setup() but it seems to does not work. ...
Adrian's user avatar
  • 96
5 votes
1 answer
3k views

How to use computed properties with tanstack's vue-query?

I'm used to using Pinia/Vuex for dispatching axios requests and storing the data in the store, then using the getters for computational operations on the data. I'm using Vue 3. A simple example: let's ...
anab1's user avatar
  • 63
1 vote
0 answers
311 views

How to use @tanstack/vue-query with graphql codegen in ts? Because there is no typescript-vue-query plugin similar to typescript-react-query for vue

Please suggest if possible in some way. I have tried to change the import path from react-query to vue-query after typescript-react-query has done with it. But I didn't able to make it work (actually ...
Aditya Yaduvanshi's user avatar
1 vote
4 answers
3k views

Vue-query returned data is read only. How to make it mutable?

import { useQuery } from "vue-query"; const { isLoading, data /* read only */, error, isError, refetch } = useQuery("todo", todo) I just found out data returned by vue-query is ...
Nicolas S.Xu's user avatar
  • 14.6k