react-apollo-hooks
react-apollo-hooks copied to clipboard
Refetching useQuery with skip: true results in a network request but does not update data
To reproduce
const {refetch, data} = useQuery(myQuery, {skip: true})
refetch().then(refetchResponse => console.log(refetchResponse.data))
What happens?
- A network request is made but
dataremainsundefined refetchResponse.datacontains 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