Skip to content

Pagination API Brainstorm #29

@dillonkearns

Description

@dillonkearns

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions