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
@@ -17,7 +17,7 @@ const enhance = compose(
withFragments({
asset: gql`
fragment TalkFeaturedComments_Tab_asset on Asset {
featuredCommentsCount: totalCommentCount(tags: ["FEATURED"], excludeIgnored: $excludeIgnored) @skip(if: $hasComment)
featuredCommentsCount: totalCommentCount(tags: ["FEATURED"]) @skip(if: $hasComment)
}`,
}),
excludeIf((props) => props.asset.featuredCommentsCount === 0),
@@ -79,7 +79,7 @@ const enhance = compose(
asset: gql`
fragment TalkFeaturedComments_TabPane_asset on Asset {
id
featuredComments: comments(tags: ["FEATURED"], excludeIgnored: $excludeIgnored, deep: true) @skip(if: $hasComment) {
featuredComments: comments(query: {tags: ["FEATURED"]}, deep: true) @skip(if: $hasComment) {
nodes {
...${getDefinitionName(Comment.fragments.comment)}
}