Adds user and message to flagaction to display in FE.

This commit is contained in:
gaba
2017-03-20 13:38:11 -07:00
parent 9e76ca5d27
commit be2ecf0838
5 changed files with 44 additions and 17 deletions
+9 -3
View File
@@ -1,9 +1,15 @@
const FlagAction = {
// Stored in the metadata, extract and return.
reason({metadata: {reason}}) {
return reason;
}
message({metadata: {message}}) {
return message;
},
reason({group_id}) {
return group_id;
},
user({user_id}, _, {loaders: {Users}}) {
return Users.getByID.load(user_id);
},
};
module.exports = FlagAction;
+1 -1
View File
@@ -31,7 +31,7 @@ type User {
username: String!
# Action summaries against the user.
action_summaries: [FlagActionSummary]
action_summaries: [ActionSummary]
# Actions completed on the parent.
actions: [Action]