These are examples of queries to fetch and add comments.
Comments from a post:
Comments and their responses, for multiple levels:
Filtering comments:
Counting comment results:
Paginating comments:
All comments on the site from a specific user:
A specific comment:
Fetching meta values:
Logged-in or non-logged-in users can add comments:
We can also use nested mutations:
Similar to adding a comment, but also providing argument parentCommentID
:
Or use the more specific replyComment
field:
Or navigate to the parent comment using nested mutations: