vue-apollo refetch result called twice?

131 Views Asked by At

I wonder is this expected or not, but everytime i do refetch the result or onResult is called twice.

const {onResult,refetch}=useQuery(GQLendpoint,options)

onResult(data=>{
   console.log(data)})

const refetchData = (newOptions)=>{
refetch(newOptions)}

every time the refetch called, the onresult is called twice. I've tried to use fetchPolicy, nextFetchPolicy to network-only/no-cache but the onResult is still called twice.

0

There are 0 best solutions below