Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 5a2bbc9

Browse files
committed
Improve documentation for postComment
1 parent 33a150c commit 5a2bbc9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

api/frontend/wp/comments/postComment.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@ import mutationAddComent from './mutationAddComment'
22
import {initializeFeApollo} from '../../connector'
33

44
/**
5-
* Retrieve next page of posts for post type archive.
5+
* Post a comment to the given post. Follows established WordPress
6+
* behavior for posting comments:
7+
*
8+
* If this is an authenticated request (i.e. "logged in"), the `author`
9+
* fields will be ignored in favor of the logged-in user's information.
10+
*
11+
* If comment moderation is turned on, the `data.createComment.comment`
12+
* object may be `null`. This does not necessarily indicate an error;
13+
* the comment may be held for moderation.
14+
*
15+
* If the comment does not need manual approval, it will be returned
16+
* with this query.
617
*
718
* @author WebDevStudios
819
* @param {string} author Name of the comment author.

0 commit comments

Comments
 (0)