Skip to main content

CreateCommentLike

Adds a like to a comment. The results of this mutation can be affected by providing an authToken header to set a user for the operation.

CreateCommentLike(
commentId: ID!
commentableId: ID!
commentableType: String!
clientId: ID
): ID!

Directives

authAccess

This requires the current user to be in STUDENT role.

Arguments

CreateCommentLike.commentId ● ID! non-null scalar

The ID of the comment.

CreateCommentLike.commentableId ● ID! non-null scalar

The ID of the commentable entity.

CreateCommentLike.commentableType ● String! non-null scalar

The type of thread, based on the thread's location, e.g. discussion board, assignment, widget thread, etc.

CreateCommentLike.clientId ● ID scalar

The ID of the client.

Type

ID scalar

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Examples

Run in Postman

Query:

CreateCommentLike(
$commentId: ID!,
$commentableId: ID!,
$commentableType: String!,
$clientId: ID
) {
CreateCommentLike(
commentId: $commentId,
commentableId: $commentableId,
commentableType: $commentableType,
clientId: $clientId
)
}

Variables:

{
"commentId": "a878d8b1-a24b-469b-b52d-02282dccbc0b",
"commentableId": "a878d8b1-a24b-469b-b52d-02282dccbc0b",
"commentableType": "abc123",
"clientId": "a878d8b1-a24b-469b-b52d-02282dccbc0b"
}

Response:

{
"data": {
"CreateCommentLike": "a878d8b1-a24b-469b-b52d-02282dccbc0b"
}
}