Implenting Batching + per request caching (dataloader) in AppSync

0

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.

Specifically:

  • 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 Post.Author.id = 5, and later field resolve Comment.Author.id = 5, does AppSync attempt to cache the earlier lookup associated with Post, or does it make two requests to resolve Author.id = 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: https://forums.aws.amazon.com/message.jspa?messageID=897682

preguntada hace 2 años82 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas