I want to get randomized data from a graph database.
Type Person
{
name
}
Can you please guide if there is an efficient DQL query to fetch random 100 person
from the database?
Second Question (nice to have feature): Pagination with randomized data.
I want to fetch 100 randomized people from the database.
Then, I want to fetch another randomized data chunk as a second page which does not contain any record from the previous fetch. (Skip option with randomized data)
There’s no random feature in Dgraph. Also, that’s the second time after a while (2 years more or less) someone is asking this. I think the ticket still open.
@MichelDiz
This is a very common scenario in graph systems.
Although it can be implemented externally using another data store like Redis, it would be nice to have feature in Dgraph itself.
I like the idea to stick to the Dgraph as a single source of truth.
came looking for a graphql way of getting randomized paginated results… is this possible or documented anywhere?.. searching the docs for “rand” returns no relevant results