Skip to main content

SubmitTestimonial

Submits a testimonial to a course group. After a learner completes a course, the learner is invited to create a public-facing testimonial where they share their experience with others. The results of this mutation can be affected by providing an authToken header to set a user for the operation.

SubmitTestimonial(
courseGroupId: UUID!
testimonial: TestimonialInput!
): Testimonial!

Directives

authAccess

This requires the current user to be in STUDENT role.

Arguments

SubmitTestimonial.courseGroupId ● UUID! non-null scalar

The ID of the course group.

SubmitTestimonial.testimonial ● TestimonialInput! non-null input

The testimonial input.

Type

Testimonial object

Contains data for a testimonial.

Examples

Run in Postman

Query:

SubmitTestimonial(
$courseGroupId: UUID!,
$testimonial: TestimonialInput!
) {
SubmitTestimonial(
courseGroupId: $courseGroupId,
testimonial: $testimonial
) {
id
createdAt
user {
...UserFragment
}
body
rating
}
}

Variables:

{
"courseGroupId": "UUID",
"testimonial": "TestimonialInput"
}

Response:

{
"data": {
"SubmitTestimonial": {
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"createdAt": "2023-12-20T16:58:58.782Z",
"user": "User",
"body": "xyz789",
"rating": 678
}
}
}