Apollo graphql fetchMore not hitting onError and causing an infinite loop of queries
I’m encountering a peculiar behavior when using fetchMore
for pagination. I’m noticing that if the initial call to useQuery
succeeds, but then a subsequent call to fetchMore
fails, then onError
is never called. Instead, onComplete
is called and the response object will contain the result from the initial, successful useQuery
call (presumably because it’s cached by Apollo although I’m not sure of the specifics).