--- title: Comment - GraphQL Admin description: A comment on an article. api_version: 2025-01 api_name: admin type: object api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/2025-01/objects/comment md: https://shopify.dev/docs/api/admin-graphql/2025-01/objects/comment.md --- # Comment object Requires `read_content` access scope or `read_online_store_pages` access scope. A comment on an article. ## Fields * article [Article](https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Article) The article associated with the comment. * author [Comment​Author!](https://shopify.dev/docs/api/admin-graphql/2025-01/objects/CommentAuthor) non-null The comment’s author. * body [String!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/String) non-null The content of the comment. * body​Html [HTML!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/HTML) non-null The content of the comment, complete with HTML formatting. * created​At [Date​Time!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) non-null The date and time when the comment was created. * events [Event​Connection!](https://shopify.dev/docs/api/admin-graphql/2025-01/connections/EventConnection) non-null The paginated list of events associated with the host subject. * id [ID!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/ID) non-null A globally-unique ID. * ip [String](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/String) The IP address of the commenter. * is​Published [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) non-null Whether or not the comment is published. * published​At [Date​Time](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) The date and time when the comment was published. * status [Comment​Status!](https://shopify.dev/docs/api/admin-graphql/2025-01/enums/CommentStatus) non-null The status of the comment. * updated​At [Date​Time](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) The date and time when the comment was last updated. * user​Agent [String](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/String) The user agent of the commenter. *** ## Map ### Fields and connections with this object * {}[Article.comments](https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Article#field-Article.fields.comments) * <->[CommentConnection.nodes](https://shopify.dev/docs/api/admin-graphql/2025-01/connections/CommentConnection#returns-nodes) * {}[CommentEdge.node](https://shopify.dev/docs/api/admin-graphql/2025-01/objects/CommentEdge#field-CommentEdge.fields.node) *** ## Queries * [comment](https://shopify.dev/docs/api/admin-graphql/2025-01/queries/comment) query Returns a `Comment` resource by ID. * [comments](https://shopify.dev/docs/api/admin-graphql/2025-01/queries/comments) query List of the shop's comments. *** ## \Comment Queries ### Queried by * \[comment](https://shopify.dev/docs/api/admin-graphql/2025-01/queries/comment) * \[comments](https://shopify.dev/docs/api/admin-graphql/2025-01/queries/comments) *** ## Mutations * [comment​Approve](https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/commentApprove) mutation Approves a pending comment, making it visible to store visitors on the associated blog article. For example, when a customer submits a question about a product in a blog post, merchants can approve the comment to make it publicly visible. Use the `commentApprove` mutation to: * Publish pending comments after review * Enable customer discussions on blog articles * Maintain quality control over comments Once approved, the comment becomes visible to all store visitors. * [comment​Not​Spam](https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/commentNotSpam) mutation Reverses a spam classification on a comment, restoring it to normal moderation status. This mutation allows merchants to change their decision when a comment has been manually marked as spam. For example, when a merchant reviews comments marked as spam and finds a legitimate customer question, they can use this mutation to restore the comment's normal status and make it eligible for approval. Use the `commentNotSpam` mutation to: * Unmark comments that were marked as spam * Restore comments to normal moderation status * Move comments back to the approval queue This action changes the comment's status from spam back to pending, where it can then be approved or managed according to standard moderation practices. * [comment​Spam](https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/commentSpam) mutation Marks a comment as spam, removing it from public view. This mutation enables merchants to quickly handle unwanted promotional content, malicious links, or other spam that appears in blog discussions. For example, when a comment contains suspicious links to unrelated products or services, merchants can mark it as spam to immediately hide it from customers. Use the `commentSpam` mutation to: * Hide promotional or malicious comments from public view * Protect customers from potentially harmful links * Maintain professional discussion quality on blog articles Spam-marked comments can be reviewed later and potentially restored using the `commentNotSpam` mutation if they were incorrectly classified. *** ## <\~> Comment Mutations ### Mutated by * <\~>[comment​Approve](https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/commentApprove) * <\~>[comment​Not​Spam](https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/commentNotSpam) * <\~>[comment​Spam](https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/commentSpam) *** ## Interfaces * * [Has​Events](https://shopify.dev/docs/api/admin-graphql/2025-01/interfaces/HasEvents) interface * [Node](https://shopify.dev/docs/api/admin-graphql/2025-01/interfaces/Node) interface *** ## ||-Comment Implements ### Implements * ||-[Has​Events](https://shopify.dev/docs/api/admin-graphql/2025-01/interfaces/HasEvents) * ||-[Node](https://shopify.dev/docs/api/admin-graphql/2025-01/interfaces/Node)