rails_cursor_pagination
rails_cursor_pagination copied to clipboard
Can this be used with GraphQL-Ruby?
It seems like it, but i don't understand the implementation of a connections wrapper well enough to really get it.
I'm guessing this would handle creating the "connection" without calling Types::Posts.connection_type?
I have not used graphql-ruby yet, but as long as you use ActiveRecord, I don't see why it shouldn't work 😃 If you pass the right params to the gem, what it returns you a Hash object with the cursor-paginate results. Take a look at the Usage section of the README.md for a bit more detail about how to invoke the paginator and what it'll return.
If you give it a try in combination with GraphQL-Ruby, please report back how it went! Might be interesting to others, too 🎉