Last active
May 19, 2022 23:05
-
-
Save glommer/5ea85b8688459da34e34231f036d5afb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const usersWithPosts = await prisma.user.findMany({ | |
orderBy: [ | |
{ | |
role: 'desc', | |
}, | |
{ | |
name: 'desc', | |
}, | |
], | |
include: { | |
posts: { | |
orderBy: { | |
title: 'desc', | |
}, | |
select: { | |
title: true, | |
}, | |
}, | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment