[SOLVED] Not able to render fetch more than 100 messages per groupchat [ChatApp]

As I was following the tutorial, I came to the realisation that the get history function does not render more than 100 messages per group, even though there are more messages stored in the database. Is there some kinda limit per API call? is there another way to fetch all the messages?

async function getHistory(){
          const Message = Moralis.Object.extend("Message");
          const query = new Moralis.Query(Message);
          query.equalTo("group",chatId)
          const results = await query.find();

          console.log(results)

I don’t know of such a limit, you say that you had more than 100 messages with that chatId and it returned only 100?

yes basically . Even in the Queries tutorial (https://www.youtube.com/embed/aUZfictZevc?start=134) Capplequoppe seems to be getting only 100 results back. Not sure if its a standard or is there a way to get more than 100 results back

ok, it sounds strange, I’ll check it later

what happens if you add query.limit(1000) in your code?

I had the same problem, the query.limit(yourDesiredQueryAmount), can override this default behaviour @cryptokid 's comment should help. :+1:

Thank you :slightly_smiling_face: