'How to do array parameters in prisma?

How can I do querying like this in prisma?

http://localhost://3000/api/users?[param1]=[value1]&[param2]=[value2]&......

Or param1, param2....can be from different model



Solution 1:[1]

req.query is object that contain query string that enter in the url and you access with req.query

const age = req.query.param1;
const score = req.query.param2;

const users = await prisma.users.findMany ({
  where: {
    age  , 
    score
  }
});

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Moein T