```js const posts = await DataStore.query(Post, Predicates.ALL, { sort: (s) => s.rating(SortDirection.ASCENDING) }); ```