Hello Dgraph team,
I’m still in the need of such a feature as it would greatly improve:
- Performances because I currently need to do random queries twice (in a transaction): First to count nodes, second to set one or more random offsets. My biggest and slowest query right now is to do matchmaking in my game, and I have to do it twice each time.
- Code readability because my current solution requires a big function.
The syntax could be similar to
random: 3 which would mean we want to pick 3 different random nodes from the current result set. It would perfectly work with
first to select the range before picking random nodes.
Please consider my request, I’m sure many projects would benefit from it