mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 06:47:33 +08:00
17 lines
469 B
JavaScript
17 lines
469 B
JavaScript
const RootMutation = {
|
|
createComment(_, {asset_id, parent_id, body}, {mutators}) {
|
|
return mutators.Comment.create({asset_id, parent_id, body});
|
|
},
|
|
createAction(_, {action}, {mutators}) {
|
|
return mutators.Action.create(action);
|
|
},
|
|
deleteAction(_, {id}, {mutators}) {
|
|
return mutators.Action.delete({id});
|
|
},
|
|
updateUserSettings(_, {settings}, {mutators}) {
|
|
return mutators.User.updateSettings(settings);
|
|
}
|
|
};
|
|
|
|
module.exports = RootMutation;
|