serverless-appsync-plugin icon indicating copy to clipboard operation
serverless-appsync-plugin copied to clipboard

Feature Request: add maxBatchSize option to configure Direct Batch Resolvers

Open westd opened this issue 2 years ago • 5 comments

https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-lambda.html#direct-lambda-resolvers

AWS has added the ability to set a maxBatchSize on a resolver so that a direct lambda resolver can handle batch loading

Please can this be added as a feature to the plugin? 🙏

From the documentation above:

Direct Lambda Resolvers: Batching enabled You can enable batching for your Direct Lambda Resolver by configuring the maxBatchSize on your resolver. When maxBatchSize is set to a value greater than 0 for a Direct Lambda resolver, AWS AppSync sends requests in batches to your Lambda function in sizes up to maxBatchSize.

Setting maxBatchSize to 0 on a Direct Lambda resolver turns off batching.

For more information on how batching with Lambda resolvers works, see Advanced use case: Batching.

westd avatar Feb 07 '22 15:02 westd

Looking at this PR I believe maxBatchSize is on its way once v2 is a wrap: https://github.com/sid88in/serverless-appsync-plugin/pull/461

Thanks @bboure!

sorenandersen avatar Feb 08 '22 09:02 sorenandersen

MaxBatchSize will indeed come in v2 but v1 too (See #463)

Master (v1) is unfortunately currently blocked by a breaking change introduced in the the latest PR. I still need to fix it before merging #463 and release a new version.

I'll keep you updated.

bboure avatar Feb 08 '22 09:02 bboure

Hi @bboure, can I ask - very politely - what is the expected timeline for a v1 release with MaxBatchSize support?

Thanks in advance for all the effort you put in.

Best, Søren

sorenandersen avatar Mar 18 '22 15:03 sorenandersen

It was part of v.13.0 sorry for the delay

bboure avatar Apr 06 '22 13:04 bboure

Thank you, we really appreciate it!

sorenandersen avatar Apr 07 '22 15:04 sorenandersen