Schema Documentation
comment
Description
Returns a Comment
Response
Returns a
Comment
Arguments
Name | Description |
---|---|
id -
ID! | Unique identifier for the comment node. |
idType -
CommentNodeIdTypeEnum | Type of unique identifier to fetch a comment by. Default is Global ID |
Example
Query
query comment(
$id: ID!,
$idType: CommentNodeIdTypeEnum
){
comment(
id: $id,
idType: $idType
){
agentapprovedauthor {
...CommentToCommenterConnectionEdgeFragment
}authorIpcommentIdcommentedOn {
...CommentToContentNodeConnectionEdgeFragment
}contentdatabaseIddatedateGmtidisRestrictedkarmaparent {
...CommentToParentCommentConnectionEdgeFragment
}parentDatabaseIdparentIdreplies {
...CommentToCommentConnectionFragment
}type
}
}
Variables
{"id":4,"idType":"DATABASE_ID"}
Response
{"data":{"comment":{"agent":"abc123","approved":false,"author":CommentToCommenterConnectionEdge,"authorIp":"abc123","commentId":987,"commentedOn":CommentToContentNodeConnectionEdge,"content":"xyz789","databaseId":123,"date":"abc123","dateGmt":"xyz789","id":4,"isRestricted":false,"karma":123,"parent":CommentToParentCommentConnectionEdge,"parentDatabaseId":123,"parentId":4,"replies":CommentToCommentConnection,"type":"xyz789"}}}