Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dgraph pagination (after uid cursor)
{
pageAfter(
func: has(Post.id),
orderdesc: Post.id,
first: 3,
after: 0x59722
) {
uid
Post.id
Post.title
}
}
[
{
"uid": "0x726ff",
"Post.id": "0002125203e24d209c479c2dc2c35cd9",
"Post.title": "Howlerbevel"
},
{
"uid": "0x65dbd",
"Post.id": "0000dcff5ccb46efb93c10fd690c19c3",
"Post.title": "Wizardglen"
},
{
"uid": "0x78324",
"Post.id": "00007ad049584dfaa38d0dcb14a69f37",
"Post.title": "Ridgemaple"
}
]
{
"extensions": {
"server_latency": {
"parsing_ns": 12400,
"processing_ns": 52115900,
"encoding_ns": 1094700
},
"txn": {
"start_ts": 951353
}
},
"data": {
"pageAfter": [
{
"uid": "0x5aefe",
"Post.id": "fffff17452eb4d509b68ebb15ad8079f",
"Post.title": "Eyeagate"
},
{
"uid": "0x73133",
"Post.id": "ffff0294e6db4a55878bf823e4ffb283",
"Post.title": "Songmagenta"
},
{
"uid": "0x74920",
"Post.id": "fffe881e472747488e5ba1055f693929",
"Post.title": "Hidequiver"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.