Fix ignored users when not logged in

This commit is contained in:
Chi Vinh Le
2017-04-21 01:18:51 +07:00
parent 6075317564
commit 3ff9313b03
+3
View File
@@ -84,6 +84,9 @@ const RootQuery = {
},
myIgnoredUsers: async (_, args, {user, loaders: {Users}}) => {
if (!user) {
return null;
}
// get currentUser again since context.user was out of date when running test/graph/mutations/ignoreUser
const currentUser = (await Users.getByQuery({ids: [user.id], limit: 1}))[0];