Closed ClementNerma closed 3 months ago
Hi! Have you tried passing in a ref/reactive as a param? Like:
const { $client } = useNuxtApp()
const text = ref('robert')
const { data } = await $client.hello.useLazyQuery(text)
// or
// const { data } = await $client.hello.useLazyQuery(() => text.value)
setTimeout(() => {
text.value = 'clement' // updating the ref should rerun the query
}, 500)
You only use the execute
function when you want to run the query with same params :)
Hi there!
I'm currently writing an application using this project (which is great btw!) but I'm encountering a few problems.
One of them is that
useLazyQuery
seems to have some pieces missing. Notably, how do I re-trigger the same query, but with different parameters? The returnedexecute
callback doesn't allow to do that...