How would one implement a user sortable list?

For example, a todo list where users can use drag and drop to reorder items in their own lists.

What kind of schema should be used for best performance?

Does Dgraph provide any advantages for this use case?

Take a look on

Drag and drop operations are an application feature (not Dgraph). With Dgraph you could create a node for each intem of the list and use sort functions in queries.

I would recommend reading these articles:

Blog Post:
Blog Post2:


On performance, hashing is the best indexing for this.


1 Like