I had to use debounce to stop the error from following twice.
const x = _.debounce((error) => {
try {
if (error) Handle.graphqlErrors(error)
} catch {
}
}, 1000)
const [onLoad] = useLazyQuery(getQuery(query), { onError: x})
Not sure if this is expected behavior. I would expect it only to be fired once time.
@hwillson My thoughts about this issue are here: https://github.com/apollographql/react-apollo/issues/2559#issuecomment-517479315
I'm still seeing this in v3.0.1 #3407
I'm still seeing this in v3.0.1 #3407
I am also facing same issue in version 3.1.5
The API is being called once but if I console something thee function that renders HTML from react.
It runs twice after getting data.loading = 'false'
Most helpful comment
I'm still seeing this in v3.0.1 #3407