More graphql fixes

This commit is contained in:
Chi Vinh Le
2017-08-30 20:42:13 +07:00
parent 37638cab86
commit 02ec1f69ee
3 changed files with 6 additions and 3 deletions
+3
View File
@@ -73,6 +73,9 @@ const getUsersByQuery = async ({user, loaders: {Actions}}, {ids, limit, cursor,
query = query.limit(limit + 1);
}
// Sort by created_at.
query.sort({created_at: sortOrder === 'DESC' ? -1 : 1});
const nodes = await query.exec();
// The hasNextPage is always handled the same (ask for one more than we need,