Schema Documentation

Comment

Description

A Comment object

Fields
Field NameDescription
agent - String User agent used to post the comment. This field is equivalent to WP_Comment->comment_agent and the value matching the "comment_agent" column in SQL.
approved - Boolean The approval status of the comment. This field is equivalent to WP_Comment->comment_approved and the value matching the "comment_approved" column in SQL. Deprecated in favor of the status field
author - CommentToCommenterConnectionEdge The author of the comment
authorIp - String IP address for the author. This field is equivalent to WP_Comment->comment_author_IP and the value matching the "comment_author_IP" column in SQL.
commentId - Int ID for the comment, unique among comments. Deprecated in favor of databaseId
commentedOn - CommentToContentNodeConnectionEdge Connection between the Comment type and the ContentNode type
content - String Content of the comment. This field is equivalent to WP_Comment->comment_content and the value matching the "comment_content" column in SQL.
Arguments
format - PostObjectFieldFormatEnum

Format of the field output

databaseId - Int! The unique identifier stored in the database
date - String Date the comment was posted in local time. This field is equivalent to WP_Comment->date and the value matching the "date" column in SQL.
dateGmt - String Date the comment was posted in GMT. This field is equivalent to WP_Comment->date_gmt and the value matching the "date_gmt" column in SQL.
id - ID! The globally unique identifier for the comment object
isRestricted - Boolean Whether the object is restricted from the current viewer
karma - Int Karma value for the comment. This field is equivalent to WP_Comment->comment_karma and the value matching the "comment_karma" column in SQL.
parent - CommentToParentCommentConnectionEdge Connection between the Comment type and the Comment type
Arguments
where - CommentToParentCommentConnectionWhereArgs

Arguments for filtering the connection

parentDatabaseId - Int The database id of the parent comment node or null if it is the root comment
parentId - ID The globally unique identifier of the parent comment node.
replies - CommentToCommentConnection Connection between the Comment type and the Comment type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - CommentToCommentConnectionWhereArgs

Arguments for filtering the connection

status - CommentStatusEnum The approval status of the comment. This field is equivalent to WP_Comment->comment_approved and the value matching the "comment_approved" column in SQL.
type - String Type of comment. This field is equivalent to WP_Comment->comment_type and the value matching the "comment_type" column in SQL.
Example
{"agent":"abc123","approved":true,"author":CommentToCommenterConnectionEdge,"authorIp":"abc123","commentId":123,"commentedOn":CommentToContentNodeConnectionEdge,"content":"xyz789","databaseId":123,"date":"abc123","dateGmt":"xyz789","id":"4","isRestricted":true,"karma":123,"parent":CommentToParentCommentConnectionEdge,"parentDatabaseId":123,"parentId":"4","replies":CommentToCommentConnection,"status":"APPROVE","type":"abc123"}