Skip to content

Conversation

liam-twist
Copy link

We are using dynamoDB with this library.
DynamoDB will error if one batch request contains duplicate ids.
And ideally with the cache enabled this does not happen

When we insert an entity into the database we clear that id from the dataloader cache.
If that Id has already been requested but not dispatched clearing the cache means we can queue the same id again.

We have changed the clear methods to re-cache the queued requests.

Have not added any tests yet.
What other changes would like to see to get this in state that you would accept.

Maybe this behavior should be configurable on the dataloader what would you consider the default setting?

Thank you.

@bbakerman bbakerman closed this Jul 5, 2021
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