Fixed server plugi

This commit is contained in:
Wyatt Johnson
2017-03-30 16:28:06 -06:00
parent cd08987502
commit 78d072a04a
2 changed files with 21 additions and 2 deletions
+12 -2
View File
@@ -10,12 +10,22 @@ module.exports = {
}
},
hooks: {
Action: {
__resolveType: {
post({action_type}) {
switch (action_type) {
case 'RESPECT':
return 'RespectAction';
}
}
}
},
ActionSummary: {
__resolveType: {
post({action_type}) {
switch (action_type) {
case 'RESPECT':
return 'HappyActionSummary';
case 'RESPECT':
return 'RespectActionSummary';
}
}
}
@@ -29,6 +29,15 @@ module.exports = `
# The time when the Action was created.
created_at: Date
}
type RespectActionSummary implements ActionSummary {
# The count of actions with this group.
count: Int
# The current user's action.
current_user: RespectAction
}
type CreateRespectResponse implements Response {