Using wrapResponse

This commit is contained in:
Belen Curcio
2017-03-31 12:37:11 -03:00
parent 173e1c16ea
commit 004e8d5fe9
4 changed files with 35 additions and 30 deletions
@@ -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"/>
);
+2 -1
View File
@@ -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'}));
}
}
},