Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DynamoDB example #241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rafaelmotaalves
Copy link

I had to implement a dataloader with Amazon's DynamoDB and ran into some limitations on Dynamo's batch API and had to add some workarounds so I thought I'd share my implementation.

This PR provides a dataloader DynamoDB example that uses it batchGet API to get items from an official example dataset.

region: AWS_REGION // aws region that the dynamodb table was created e.g. us-east-1
});

const movieLoader = new Dataloader(async ids => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will generate an error, batchGet expects a Set[] of keys, no duplicates, otherwise it will fail.

@saihaj saihaj mentioned this pull request Mar 11, 2022
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants