问题描述
使用 nodejs 玩弄放大和数据存储并做出反应。
我有 message
的模型
type Message
@model
@auth(rules: [{allow: owner,operations: [read,create,update,delete]}]) {
id: ID!
content: String!
}
我想获取所有消息并按降序排序。 我想做什么
const messages = await DataStore.query(Message,Predicates.ALL,{
sort: s => s.createdAt(SortDirection.DESCENDING),page: 0,limit: 20
});
我的解决方案似乎根本不影响排序。我错过了什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)