Last active
May 28, 2019 13:16
-
-
Save romshark/0e543b1ba9e8689c1866420902318428 to your computer and use it in GitHub Desktop.
Dgraph pagination (lastSix)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
lastSix( | |
func: has(Post.id), | |
orderdesc: Post.id, | |
offset: 83713 | |
) { | |
count(uid) | |
uid | |
Post.id | |
Post.title | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extensions": { | |
"server_latency": { | |
"parsing_ns": 7900, | |
"processing_ns": 2749854200, | |
"encoding_ns": 1405400 | |
}, | |
"txn": { | |
"start_ts": 951347 | |
} | |
}, | |
"data": { | |
"lastSix": [ | |
{ | |
"count": 6 | |
}, | |
{ | |
"uid": "0x78b52", | |
"Post.id": "00035642f6fe45ecbcee65ff7a78a116", | |
"Post.title": "Bellobsidian" | |
}, | |
{ | |
"uid": "0x68678", | |
"Post.id": "0002ba47258d4a979e362472aaf52982", | |
"Post.title": "Speakerfast" | |
}, | |
{ | |
"uid": "0x59722", | |
"Post.id": "00027495730d47f3a3aa834182142d23", | |
"Post.title": "Bellyancient" | |
}, | |
{ | |
"uid": "0x726ff", | |
"Post.id": "0002125203e24d209c479c2dc2c35cd9", | |
"Post.title": "Howlerbevel" | |
}, | |
{ | |
"uid": "0x65dbd", | |
"Post.id": "0000dcff5ccb46efb93c10fd690c19c3", | |
"Post.title": "Wizardglen" | |
}, | |
{ | |
"uid": "0x78324", | |
"Post.id": "00007ad049584dfaa38d0dcb14a69f37", | |
"Post.title": "Ridgemaple" | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment