Random ordering
Random ordering is useful in situations where you want to present the end user with the unique entity listing every time he/she accesses it.
Random
The constraint makes the order of the entities in the result random and does not take any arguments.
The sample query always returns a different page of products.
Random with seed
- argument:long!
defines the seed for the random number generator, providing the same seed always produces the same order of entities in the result
The constraint makes the order of the entities in the result pseudo-random based on the seed provided. The seed is a number that determines the order of the entities. The same seed will always produce the same order of entities.
This variant of random ordering is useful when you need to make the output random, but always the same way (e.g. for testing purposes, or for consistent output for a given user).
The sample query always returns a same page of products, which seems to be random, but it is always the same.