mirror of
https://github.com/wassname/talk.git
synced 2026-07-08 17:04:57 +08:00
27 lines
488 B
JavaScript
27 lines
488 B
JavaScript
const { merge } = require('lodash');
|
|
|
|
module.exports = {
|
|
RootMutation: {
|
|
createComment: {
|
|
async pre(_, { input }, _context, _info) {
|
|
input.metadata = merge(
|
|
{},
|
|
{
|
|
htmlBody: input.htmlBody,
|
|
}
|
|
);
|
|
},
|
|
},
|
|
editComment: {
|
|
async pre(_, { edit }, _context, _info) {
|
|
edit.metadata = merge(
|
|
{},
|
|
{
|
|
htmlBody: edit.htmlBody,
|
|
}
|
|
);
|
|
},
|
|
},
|
|
},
|
|
};
|