mirror of
https://github.com/wassname/talk.git
synced 2026-07-08 14:24:50 +08:00
Merge pull request #593 from coralproject/readd-last-comment
Readd lastComment field to asset resolver
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user