When work random query in dgraph cloud

Not working in dgraph cloud but it’s work in my local
Give me solution i need this solution asap in dgraph cloud
Thanks
{
q(func: type(Person), random: 5) {
name
uid
}
}

Please, share the steps you made. Can you also check the version of Dgraph in the Cloud?

IIRC, the random feature was added to 21.12, and the cloud is on 21.03.

As a workaround, client side you could generate 5 random numbers within the total numbers of records and issue five queries with first: 1 offset: x.

1 Like

the cloud is on 21.03
we are using dedicated server

As said by Matthew, this is related to the release. The Random feature was Merged shortly after this version that is in the cloud. There is still no forecast of cloud version upgrade.

If the issue is another do this:

Run this to check if there is any dataset anyway.

{
q(func: has(name), first: 5) {
   name
   uid
   dgraph.type
  }
}

If you see results and there is node with dgraph.type = “Person”.