I use react-apollo useLazyQuery hook. My goal to use it in fetch more button click. However, when I try to use it the fetchMore function is undefined.
Here the call to it:
const [getMyData,{ loading, data, fetchMore }] = useLazyQuery(
myQuery,
{
notifyOnNetworkStatusChange: true,
fetchPolicy: 'network-only',
variables: {}
})
Even if I run lazy on component ready, fetchMoreStill undefined.
useEffect(()=>{
getMyData()
},[])
The question is why it is undefined?
"apollo-client": "^2.6.4", "react-apollo": "^3.1.3",
getMyPledges
!=getMyData