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
A clearer explanation for cursor pagination configuration #1791
Comments
Hi, did you read the connections guide? http://graphql-ruby.org/relay/connections.html It answers a few of those questions, let me know what you think. |
How about arbitrary JSON object? Just define the type ourselves? Also that page does not give any answers on root field pagination. |
Cursor doesn't work as expected. I don't want to have my cursors based on id only.
result:
pageInfo cursors are wrong - they are merely based on id - Base64.encode(id) If i'm trying to pass "Post-1" as a 'before' or 'after' parameter - i'm receiving "message": "Invalid cursor: "Post-1"" graphql (1.8.13) |
👋 I've redone the connection system in 1.10 and you can find the new docs here: https://graphql-ruby.org/pagination/overview.html Sorry for the late response here, but if you still have specific questions, please open a new issue! |
We finally got to the point, where we build something in GraphQL that also requires pagination.
Pro version has cursors pagination built in, but it's not very clear how to:
I'd guess the first one is rather self-explanatory
The second one is to allow our users as before select from a large number of different filtering options like "status is X", "type is one of(x,y,z)" etc.
Thirdly, we want to paginate records that can be sorted by variety of fields (and maybe even by several fields simultaneously). This requires these fields to be included in both
ORDER BY
andWHERE
clauses together with primary key. Hence, the question: how to override scope and cursor parameters generated by built in functionality?Thanks.
The text was updated successfully, but these errors were encountered: