mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 03:31:01 +08:00
14 lines
368 B
JavaScript
14 lines
368 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});
|
|
},
|
|
};
|
|
|
|
module.exports = RootMutation;
|