Hello,
when I use refetech loading is not updated to true and after fetch to false. Is it issue or I'm doing something wrong?
const FoldersContainerWithGraphQL = compose(
withApollo,
graphql(GET_FOLDERS_REVIEW, {
options: () => {
return {
variables: {limit: FOLDERS_PER_PAGE, offset: 0}
};
},
props: ({data, data: {fetchMore}}) => {
return {
folders: {
...data,
loadMoreEntries(pageNumber) {
return fetchMore({
variables: {
offset: FOLDERS_PER_PAGE * pageNumber
},
updateQuery: (previousResult, {fetchMoreResult}) => {
if (!fetchMoreResult) {
return previousResult;
}
return fetchMoreResult;
}
});
}
}
};
}
})
)(FoldersContainer);
Looks like refetch doesn't update the component at all? I'm having to manage that state myself
You could try setting notifyOnNetworkStatusChange to true.
Most helpful comment
Looks like refetch doesn't update the component at all? I'm having to manage that state myself