aws-appsync-community
aws-appsync-community copied to clipboard
Mapping Template APPSYNC_JS runtime: Array.prototype.reduce silently stops at 1000th element
I've built a small CDK application to verify this behavior.
I would like to process over 1000 (very small) results from a DynamoDb query result set in an AppSync response mapping template. All of the results are delivered to the response mapping template, but calling reduce()
on the resultset items
array only processes the first 1000 results, silently returning the accumulator without processing the remaining results thereafter.
Why are we limited to 1000 items in the reduce()
call? And if this is simply a shortcoming of the APPSYNC_JS runtime, why on earth wouldn't it be documented anywhere? This page claims that Array.prototype.reduce is supported, and says NOTHING about a limit of 1000 items. Can someone help me understand what is going on?