By using AWS re:Post, you agree to the Terms of Use

Implenting Batching + per request caching (dataloader) in AppSync


In AppSync, what are modern best practices to implement dataloader (aka, per-request batching + caching) patterns?

Most answers on the internet date from ~2018-19, and there's no clear answer as to the current capabilities of the product to emulate standard dataloader patterns you would implement in node/elixir/ruby/rust.


  • Is BatchInvoke still limited to resolving 5 items at a time (turning N + 1 into N/5 + 1)?
  • Are resolutions de-duplicated in a request? (for example, if I field resolve = 5, and later field resolve = 5, does AppSync attempt to cache the earlier lookup associated with Post, or does it make two requests to resolve = 5 (first for Post then for Comment)?
  • What role does the paid caching solution play in solving these problems and how does per-resolver caching interact with any baked-in dataloading capabilities (i think whole-request caching is pretty clear).
  • Where are / are additional dataloading capabilities in the product roadmap?

There is an older related discussion on the forums here:

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions