comment count optim, prep for sortBy

This commit is contained in:
Wyatt Johnson
2017-08-21 15:26:04 -06:00
parent 15111c81a2
commit 01ed9880f4
11 changed files with 93 additions and 282 deletions
@@ -103,7 +103,7 @@ const withCommentFragments = withFragments({
fragment CoralEmbedStream_Comment_comment on Comment {
...CoralEmbedStream_Comment_SingleComment
${nest(`
replies(limit: 3, excludeIgnored: $excludeIgnored) {
replies(query: {limit: 3, excludeIgnored: $excludeIgnored}) {
nodes {
...CoralEmbedStream_Comment_SingleComment
...nest
@@ -253,9 +253,9 @@ const fragments = {
charCount
requireEmailConfirmation
}
commentCount(excludeIgnored: $excludeIgnored) @skip(if: $hasComment)
totalCommentCount(excludeIgnored: $excludeIgnored) @skip(if: $hasComment)
comments(limit: 10, excludeIgnored: $excludeIgnored) @skip(if: $hasComment) {
commentCount @skip(if: $hasComment)
totalCommentCount @skip(if: $hasComment)
comments(query: {limit: 10, excludeIgnored: $excludeIgnored}) @skip(if: $hasComment) {
nodes {
...CoralEmbedStream_Stream_comment
}