-
Notifications
You must be signed in to change notification settings - Fork 2
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
Implement feature that allows denormalization of vote counts #44
Conversation
const vote_code = fetchProp(safe_params, ['fields', 'code']) | ||
|
||
// TODO: Implement transactions. | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, currently if the plugin crashes when trying to de-normalize a poll rating, the submission of the vote will not be rolled back (i.e. undone). This violates ACID and must be handled via implementation of a transaction.
|
||
|
||
function getEntityInfoForSave(args, _ctx, opts) { | ||
Assert.object(opts, 'opts') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we, perhaps, implement validation of the plugin options, passed to the plugin by the client? Such validation would be implemented in index.js
, and make sure client passes supported well-formed options.
#43
Tests fail because the version of
mem-store
which supports upserts has not been released yet. When run against the latest mem-store vianpm link
, all tests pass: