When using AWS AppSync with lambda data sources you can encounter N+1 query problem.
Basically when you have individual field resolver on your type and your query returns an array of those types you field resolver lambda will be called N times.
AWS introduces BatchInvoking lambdas in resolvers to combat this problem. Here you can read more about the problem and their solution: https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html#advanced-use-case-batching
However, their solution is not working. BatchInvoking lambdas are limited to only 5 events (this is not stated in documentation). It is a slight improvement to the N+1 problem (it makes it N/5+1), but I think it is not enough as more complex queries tend to execute for a very long time and require more lambda invocations.
So my question is how do you deal with this problem? Is there any better solution to this?