【发布时间】:2021-08-11 21:34:25
【问题描述】:
我在节点 JS 中创建了一个应用程序,我从 mongoose 数据库中获取数据,如下所示
await dataCollection.find({
type: 'user',
}).sort([['short_order', 1]]).then((results) => {
console.log(reslts)
});
从 mongodb 返回数据,但有时它返回 null 而没有任何更改(从总共 10 个请求中的 2-3 个返回 null)
还使用 apollo 服务器进行 graphql 查询,其中接收以下集合数据。
请建议我如何解决这个问题。
【问题讨论】: