Add example for Pagination in Java Code

Posted by fendor:


Pagination is an important feature of Dgraph. However, currently it looks like you have to wrap the pagination support in your application yourself.

My request would be to add Documentation and an Example on how the pagination could be used in a java application.

manishrjain commented :

There are examples of pagination in I’m not sure what exactly are you looking for, that’s so specific to Java.

fendor commented :

Well, how could you use it in java code? Is there some builtin support by the library?
Or do I have to implement it myself via queries and invoke them repeatedly with different parameters?

deepakjois commented :

There is no builtin support for pagination. So you will have to write your own helper methods to handle pagination, which construct the query for specifying page sizes and offsents.

The Dgraph Java client follows the official Go client closely, which is quite minimal does not have any additional helpers for handling pagination. The Java client will support any such functionality only if the Go client supports it as well.

fendor commented :

I see, thanks for the clarification!