How to implement scroll restoration with infinite scroll in Hydrogen V1?

Hi all,

I am attempting to implement an infinite scroll to a Hydrogen V1 (hosted on Oxygen) build which has been pretty straight forward but there is 1 issue and that is that I cannot get the scroll restoration to work correctly when you go back to the collection page from the PDP.

It only ever seems to paginate the once regardless of how many ‘pages’ you have paginated for in the gql query.

I have attempted using serverProps, and react-infinite-scroll modules as well use using URL query params but that only works if you want to load less than 250 products at once due to the limits on the gql query which doesn’t work for me in this case the product catalogue is very big and many collections have over 250 products.

I have looked at several Hydrogen based sites and none of them have scroll restoration working.

Has anyone managed to successfully implement an infinite scroll experience with Hydrogen V1 or is it just not possible?