Merge branch 'master' into new-flags

This commit is contained in:
Wyatt Johnson
2017-09-19 17:12:56 -06:00
committed by GitHub
10 changed files with 183 additions and 47 deletions
+8
View File
@@ -50,6 +50,14 @@ const RootQuery = {
return Comments.getCountByQuery(query);
},
async userCount(_, {query}, {user, loaders: {Users}}) {
if (user == null || !user.can(SEARCH_OTHER_USERS)) {
return null;
}
return Users.getCountByQuery(query);
},
assetMetrics(_, query, {user, loaders: {Metrics: {Assets}}}) {
if (user == null || !user.can(SEARCH_ASSETS)) {
return null;