How would one use prisma to select only the first ...
# orm-help
a
How would one use prisma to select only the first X out of find many? (code in replies_
Copy code
const tanks = await prisma.rosters.findMany({
    orderBy: [
        {
            applied: 'desc',
        },
    ],
    where: {
        raid_id: element.id,
        main: 'tank',
    }
})
I'd like to only select the first 2 results (as they'll be sorted in the order I want by applied.) Is that something possible with Prisma?
Update: The "take" argument seems to work well, sorry!
👍 2
💯 1
j
Just in time learning we call that 😄