Questions tagged [vue-query]

4 questions
2
votes
1 answer

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 say I have a table, I fetch the data from the…
anab1
  • 33
  • 1
  • 6
1
vote
0 answers

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 I don't know how). myplugin.js - copied from…
1
vote
1 answer

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 read only. Vue-query is similary project to React-query. You can find…
Nicolas S.Xu
  • 13,794
  • 31
  • 84
  • 129
0
votes
1 answer

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. How should i do it properly?