Files
talk/client/coral-framework/graphql/queries/streamQuery.graphql
T

50 lines
1.5 KiB
GraphQL

#import "../fragments/commentView.graphql"
query AssetQuery($asset_id: ID, $asset_url: String, $comment_id: ID!, $has_comment: Boolean!, $notIgnoredBy: String) {
# the comment here is for loading one comment and it's children, probably after following a permalink
# $has_comment is derived from the comment_id query param in the iframe url,
# which is in turn pulled from the host page url
comment(id: $comment_id) @include(if: $has_comment) {
...commentView
replyCount(notIgnoredBy: $notIgnoredBy)
replies {
...commentView
}
parent {
...commentView
replyCount(notIgnoredBy: $notIgnoredBy)
replies {
...commentView
}
}
}
asset(id: $asset_id, url: $asset_url) {
id
title
url
closedAt
created_at
settings {
moderation
infoBoxEnable
infoBoxContent
questionBoxEnable
questionBoxContent
closeTimeout
closedMessage
charCountEnable
charCount
requireEmailConfirmation
}
commentCount(notIgnoredBy: $notIgnoredBy)
totalCommentCount(notIgnoredBy: $notIgnoredBy)
comments(limit: 10, notIgnoredBy: $notIgnoredBy) {
...commentView
replyCount(notIgnoredBy: $notIgnoredBy)
replies(limit: 3, notIgnoredBy: $notIgnoredBy) {
...commentView
}
}
}
}