little-bear-labs / aws-utils

Apache License 2.0
56 stars 35 forks source link

[134] AppSync Emulator - Implement `conditionalCheckFailedHandler` #136

Closed asodeur closed 5 years ago

asodeur commented 5 years ago

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

lightsofapollo commented 5 years ago

@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)