mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 17:21:58 +08:00
54 lines
1.6 KiB
GraphQL
54 lines
1.6 KiB
GraphQL
#import "../fragments/commentView.graphql"
|
|
|
|
query AssetQuery($asset_id: ID, $asset_url: String, $comment_id: ID!, $has_comment: Boolean!, $excludeIgnored: Boolean) {
|
|
# 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(excludeIgnored: $excludeIgnored)
|
|
replies {
|
|
...commentView
|
|
}
|
|
parent {
|
|
...commentView
|
|
replyCount(excludeIgnored: $excludeIgnored)
|
|
replies {
|
|
...commentView
|
|
}
|
|
}
|
|
}
|
|
asset(id: $asset_id, url: $asset_url) {
|
|
id
|
|
title
|
|
url
|
|
closedAt
|
|
created_at
|
|
settings {
|
|
moderation
|
|
infoBoxEnable
|
|
infoBoxContent
|
|
premodLinksEnable
|
|
questionBoxEnable
|
|
questionBoxContent
|
|
closeTimeout
|
|
closedMessage
|
|
charCountEnable
|
|
charCount
|
|
requireEmailConfirmation
|
|
}
|
|
lastComment {
|
|
id
|
|
}
|
|
commentCount(excludeIgnored: $excludeIgnored)
|
|
totalCommentCount(excludeIgnored: $excludeIgnored)
|
|
comments(limit: 10, excludeIgnored: $excludeIgnored) {
|
|
...commentView
|
|
replyCount(excludeIgnored: $excludeIgnored)
|
|
replies(limit: 3, excludeIgnored: $excludeIgnored) {
|
|
...commentView
|
|
}
|
|
}
|
|
}
|
|
}
|