trojanowski/react-apollo-hooks

Refetching useQuery with skip: true results in a network request but does not update data

anantkamath opened this issue · 0 comments

To reproduce

const {refetch, data} = useQuery(myQuery, {skip: true})
refetch().then(refetchResponse => console.log(refetchResponse.data))

What happens?

  1. A network request is made but data remains undefined
  2. refetchResponse.data contains the expected response

Thus there is an inconsistency where data is not updated, but updated data is still available via the promise returned by refetch.

Using v3.1.3