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