I am a front end dev with some experience creating dapps, and I would like to know your best practice for fetching large amounts of data from a chain.
Say there is a dapp allowing users to make posts of some kind and these posts are kept in a list.
To get the full information about the post we need to call a getter each post using its index / key / whatever.
Either way, what is the best method to make many calls to a contract without completely flooding my API keys? Is there a sensible way of batching them? Are you just expected to make 1000s of calls every time a user loads a page (doesn’t seem great scalability wise)? Does this problem just need to be solved on the smart contract level so you can get all the required information in one API call?
Is there another solution?
I feel this is really limiting me in building dApps but I see many websites out there achieving the desired results.
I hope I explained that well enough, any advice would be really appreciated.
Many thanks X.