scaife-viewer / readhomer

in-progress flagship demo project for the Scaife Viewer ecosystem
3 stars 2 forks source link

infinite scroll #14

Open jtauber opened 5 years ago

jtauber commented 5 years ago

this might need to be a toggle via a widget (because it sort of competes with pagination) but for some projects it will be nice to have infinite scroll and this is a good project to prototype it on

jacobwegner commented 5 years ago

I sense some overlap with the backend on this; there are certainly ways should be able to query the backend for just pagination (to know the boundaries of chapter or a book).

Cursor-based pagination for GraphQL endpoints is currently implemented and conforms to the Relay Cursor Connections Specification, but the server itself doesn't enforce (e.g., by default, we can return everything).

The server should enforce limits and require the client to use cursors to retrieve data; likely worth taking a closer look at what the Apollo Client does to integrate with cursors/pagination to help us adopt it for the FE.