I am new to nestjs and typeorm. I have a big table of products in MySQL. The requirement #1 is that everytime findAll is called, the products are ordered randomly. The requirement #2 is that the data is retrieved as the user scrolls down.
I thought using pagination with skip and take, ordered by id desc, would be enough, but the problem is that on each page, all users would see the same products shuffled, and the objective is that on each page each user sees diferente objects.
Please give me an idea of how to make the shuffle and the loading of products as the user scrolls down
I tried using skip and take and after retrieving the data, calling to a function that shuffles the array.