Hey <!everyone> :v: We just released Prisma <http...
# prisma-whats-new
n
Hey <!everyone> ✌️ We just released Prisma 2.4.0 prisma rainbow Here is what’s new in this version: 👒 Order by multiple fields A long-awaited feature - the ability to order by multiple fields in Prisma Client is finally here! Until now you could only order by a single scalar field of a model. The API design however was already prepared for ordering multiple fields with the object syntax we have. Instead of just one property, that 
orderBy
 object can now have as many fields as you want! The order of the fields hereby determines the order of the returned list (see example below). You can use it like so:
Copy code
// order by `age` descending and then by `name` ascending
const users = await prisma.user.findMany({
  orderBy: {
    age: 'desc',
    name: 'asc'
  }
})
As mentioned by the comment, the returned objects in 
users
 are ordered first by 
age
 (descending), and then by 
name
 (ascending). 💰 Introduced 
$
 dollar prefix for top-level Prisma Client methods
In recent versions, we introduced a couple of top-level methods in Prisma Client (e.g. 
prisma.transaction()
 and 
prisma.use()
) in preview mode. The immediate feedback was that the denylist for model names grew - which breaks Prisma schemas where a model is called 
Transaction
transaction
use
, or 
Use
. And the list goes on... In order to have a future-proof API, that allows maximum expressibility in terms of model names, we decided to prefix all non-query methods with a dollar sign 
$
. That means Prisma Client will from now on ship with the following methods: Pre-existing:
$disconnect
$connect
$on
$queryRaw
$executeRaw
Still in preview:
$use
$transaction
The preview methods have already been renamed, the pre-existing methods like 
connect
 are still available, you just get a deprecation warning. They will be available for a few more releases with an alias, so no hurry to update them yet. 🖥️ Updates in Prisma Studio With this release, we shipped a number of improvements and changes for Prisma Studio: • Refreshed design • Moved the Reload button from the right of the databrowser to the left • Moved the Pending Actions bar from the bottom of the databrowser to the top right • Removed the sidebar; to open a model, you can now press the New Tab button on the top • Removed the code editor • Removed the tree view • Added ability to view and edit JSON fields Try out Prisma Studio in the online demo or in your Prisma project by running:
Copy code
npx prisma studio --experimental
👀 Preview features Just a quick reminder that we currently have the following preview features: • 
connectOrCreate
• 
transactionApi
• 
aggregateApi
• 
distinct
• 
middlewares
In case they're useful for you, please give them a try and share your feedback! These features remain in preview in this release. 📚 Learn more in the release notes For more info and links to documentation, you can read the release notes. 🌟 Help us spread the word about Prisma 🌟 To help spread the word about Prisma, we'd very much appreciate if you would star the repo 🌟 And if you're excited about the features in this week's release, then help us and share your excitement on Twitter.
🇵🇭 7
🇽🇰 6
🔥 13
prisma cool 17
🇨🇱 6
prisma rainbow 29
💪 8
🌃 1
🏒 1
prisma green 76
❤️ 33
😎 14
graphcool 9
germany parrot 9
👒 5
graphql 10
😷 4
🌟 7
😻 3
🚀 7
🇮🇱 3
🇮🇳 3
🇹🇷 2
🏴󠁧󠁢󠁳󠁣󠁴󠁿 1
🇦🇲 1
🇵🇰 2
🇻🇪 9
5
🔮 4
🇧🇷 3
🇦🇷 2
🇰🇷 5
🇪🇬 1
👍 1
🇳🇴 1
🎉 48
fast parrot 28
😍 10
🤩 7
🇺🇸 2
🇨🇳 1
portugal parrot 3
🇨🇦 12
💚 8
mexico parrot 6
🤯 4
🇷🇺 3
🇺🇦 3
🇸🇰 1
🇳🇬 2