-
-
Notifications
You must be signed in to change notification settings - Fork 109
Description
I would like to collect use cases and ideas about pagination helpers in dillonkearns/graphqelm
. I made a simple concrete example that does basic pagination using the Github API: examples/src/GithubPagination.elm
.
Here is some reference material:
Facebook's Relay Connections Cursor Specification - this describes the standard format for pagination in GraphQL.
Post from Apollo blog on understanding connections - this explains it in more practical terms.
Apollo has a fetchMore
function, but it may not be so relevant in the context of Elm because of the very different way of performing side-effects and using types:
https://www.apollographql.com/docs/react/recipes/pagination.html
Here's a blog post describing pagination with Apollo.
In my example code at the top of this post, it seems fairly straightforward without any helper functions and it's hard to imagine helper functions making it easier. I may be missing something or not accounting for some use cases, though. I'd love to hear other people's ideas on how pagination could be made simpler with helper functions or generated code.