github aws-powertools/powertools-lambda-python v2.40.0

latest release: v2.40.1
3 days ago

Summary

We're excited to announce Batch resolvers in GraphQL Event Handler to tackle the infamous N+1 problem in GraphQL πŸ’ͺ, making it easier to work with batching in AWS AppSync.

Thanks to @danieljnchen, the validation utility now supports referencing internal schemas within your JSON files. 🌟

🌟 ⭐ A big thank you to our new contributors: @scampbell5, @matteofigus, and @danieljnchen.

Batch resolvers in Event Handler GraphQL

Docs

You can now use a batch resolver to handle batch requests coming from AWS AppSync. This is useful when AWS AppSync has batching enabled for Lambda Resolvers as it allows the aggregation of as many requests as possible before invoking your AWS Lambda function, effectively solving the N+1 problem in GraphQL.

batch_resolver

Validation feature now supports custom handlers

Docs

You can now control JSON schema references with custom handlers. This is useful when you might want to optimize caching, reducing HTTP calls, or fetching them from non-HTTP endpoints.

validation

Last but not least, @scampbell5 helps us fix the types for partition and offset in the KafkaEventRecord Event Source Data Class.

Changes

🌟New features and non-breaking changes

  • feat(event-handler): add appsync batch resolvers (#1998) by @mploski
  • feat(validation): support JSON Schema referencing in validation utils (#4508) by @danieljnchen

πŸ“œ Documentation updates

πŸ› Bug and hot fixes

  • fix(event_sources): change partition and offset field types in KafkaEventRecord (#4515) by @scampbell5

πŸ”§ Maintenance

This release was made possible by the following contributors:

@danieljnchen, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa, @leandrodamascena, @matteofigus, @mploski, @ran-isenberg and @scampbell5

Don't miss a new powertools-lambda-python release

NewReleases is sending notifications on new releases.