New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments: Effortless Pagination with GraphQL and Relay? Really! #606
Comments
It's the year 2021. Does relay-hooks change anything? |
@terrisgit it only changes some client-side implementation code. The fundamentals remain unchanged imo. |
How do you deal with these types of errors? |
I got it to work by adding "after" as an argument to the filters option which causes it to refetch the entire query with the after arg. fragment Example_query on Query
@argumentDefinitions(
first: { type: "Int", defaultValue: 20 }
after: { type: "String" }
)
@refetchable(queryName: "ExamplePaginationQuery") {
someConnection(first: $first, after: $after)
# <----- add "after" to the filters array
@connection(key: "Example_someConnection", filters: ["after"]) {
edges: {
...
}
}
} |
It's the year 2020. You use a modern front-end stack of Relay, GraphQL, React and TypeScript. You can build an infinite scroll 'feed' type UI totally out of the box with these tools, by mostly putting together boilerplate (proper connections, along with a pagination container). You have a design system, and are rapidly building up a component library. Things are great!
Then you take a look at the latest design comps for a 'browse' type page, and you see that the
controversial infinite scroll has been replaced by a more traditional pagination bar.
Comment thread for windowed pagination post!
The text was updated successfully, but these errors were encountered: