mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
Using wrapResponse
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
|
||||
export default () => (
|
||||
<i className="fa fa-handshake-o" aria-hidden="true"></i>
|
||||
<i className="fa fa-handshake-o" aria-hidden="true"/>
|
||||
);
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
const typeDefs = require('./server/typeDefs');
|
||||
const wrapResponse = require('../../graph/helpers/response');
|
||||
|
||||
module.exports = {
|
||||
typeDefs,
|
||||
resolvers: {
|
||||
RootMutation: {
|
||||
createRespect(_, {respect: {item_id, item_type}}, {mutators: {Action}}) {
|
||||
return Action.create({item_id, item_type, action_type: 'RESPECT'});
|
||||
return wrapResponse(Action.create({item_id, item_type, action_type: 'RESPECT'}));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user