Open jeremy303 opened 3 years ago
I'm facing the same issue. When I call fetchMore with increased page, checking in the network, it still return the correct result, but onCompleted doesn't give me anything.
I'm experiencing a similar issue - the fetchMore call is completing on the network side, but the Promise it returns is never resolved or rejected. This also is preventing the data itself from updating as a result.
Having the same issue - right now I pretty much have to conditionally trigger a fetchMore() in the render loop to ensure that the remaining pages (after the second one) gets loaded.
I think when you set notifyOnNetworkStatusChange: true
then onCompleted
will be called after fetchMore
.
I think when you set
notifyOnNetworkStatusChange: true
thenonCompleted
will be called afterfetchMore
.
It will also trigger re-renders on every network status change, which is rather undesirable 😐
Looks like the issue is pretty old https://github.com/apollographql/react-apollo/issues/3709
Any progress?
Still have the same issue here as well. Is there any plan to fix this? Is this suppose to work this way?
(If this should move to StackOverflow, just let me know. )
Intended outcome:
I'm trying to recursively fetch all pages of a query's results by executing
fetchMore
in myonCompleted
handler.The example query:
The server uses Relay-style pagination, so I'm using the
relayStylePagination
helper:Actual outcome:
onCompleted
is only called once when the first page is loaded, but not afterfetchMore
, resulting in only the first two pages being fetched.How to reproduce the issue:
(If needed, I can create a reproduction of the error)
Versions