Skip to content
This repository has been archived by the owner on Sep 30, 2019. It is now read-only.

[134] AppSync Emulator - Implement conditionalCheckFailedHandler #136

Conversation

asodeur
Copy link
Contributor

@asodeur asodeur commented May 22, 2019

This PR implements strategy "Reject" for PutItem.

Currently using lodash.omit and lodash.isEqual. Not sure what the policy for including 3rd party libs is. Any preferred method for deep equality comparison?

Strategy "Custom" would need considerably more work as it cannot be handled in dynamodbSource.js alone. The current implementation attaches the old values to the ConditionalCheckFailedException before re-throwing when strategy is "Custom".

Partial implementation of #134

… for PutItem, Strategy "Custom" needs more work
@lightsofapollo
Copy link
Contributor

@asodeur tldr; Third party libs are fine but we try to be aware of their size and how they slow down the npm install (emulator has a ton of packages required already)

}, {}),
)
)
return Promise.resolve(oldValues);
Copy link
Contributor

Choose a reason for hiding this comment

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

Pretty sure you can just return oldValues here

@lightsofapollo lightsofapollo merged commit 3e89cbc into little-bear-labs:master May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants