Fix load more buttons

This commit is contained in:
Chi Vinh Le
2017-04-13 01:17:46 +07:00
parent c19e2979fc
commit 92205a2c6f
5 changed files with 24 additions and 5 deletions
+7
View File
@@ -1,4 +1,11 @@
const Asset = {
lastComment({id}, _, {loaders: {Comments}}) {
return Comments.getByQuery({
asset_id: id,
limit: 1,
parent_id: null
}).then(data => data[0]);
},
recentComments({id}, _, {loaders: {Comments}}) {
return Comments.genRecentComments.load(id);
},
+3
View File
@@ -413,6 +413,9 @@ type Asset {
# The URL that the asset is located on.
url: String
# Returns last comment
lastComment: Comment
# Returns recent comments
recentComments: [Comment]