Last active
May 28, 2019 13:26
-
-
Save romshark/6c33430d0dae4eaf2835670d4df969b4 to your computer and use it in GitHub Desktop.
Dgraph pagination (after uid cursor)
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
{ | |
pageAfter( | |
func: has(Post.id), | |
orderdesc: Post.id, | |
first: 3, | |
after: 0x59722 | |
) { | |
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
[ | |
{ | |
"uid": "0x726ff", | |
"Post.id": "0002125203e24d209c479c2dc2c35cd9", | |
"Post.title": "Howlerbevel" | |
}, | |
{ | |
"uid": "0x65dbd", | |
"Post.id": "0000dcff5ccb46efb93c10fd690c19c3", | |
"Post.title": "Wizardglen" | |
}, | |
{ | |
"uid": "0x78324", | |
"Post.id": "00007ad049584dfaa38d0dcb14a69f37", | |
"Post.title": "Ridgemaple" | |
} | |
] |
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": 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