- My goal is: Need data every time
- My actions are: get data from mongoose database
- The result I see is: sometimes data return null
- My expectation & question is:
I create one application in node JS in that i fetch data from mongoose database
await dataCollection.find({
type: ‘user’,
}).sort([[“short_order”, 1]]).then((results) => {
console.log(reslts)
});
Also use apollo server as graphql query. according to below query data exits in database but sometime data return and sometimes it’s shown black (without any change)
Please suggest how can i resolve this problem because in live server receive data after 1-2 call
mongoose version 5.13.2