Vue-Apollo V4 Helper
It's small library to make your Vue-apollo experince smoother and less complicated.
Features
Watch Result
Fix for known from a long time issue that causing cached results don't call onResult function.
example:
const { result } = useQuery(query)
watchResult(result, (result) => {
// Will always be called, even on cached queries
console.log(result)
})
Async Result
Function that returns result from query as Promise
, helpful with actually in experimental state Suspense
feature and removing overhead from simple async functions.
example:
const { result } = useQuery(query)
const result = await asyncResult(result)