Skip to main content

CreateAssignmentSubmission

Creates an assignment submission. This is used when user works on a manually graded assessment, the assessment attempt will be associated with the assignment submission. The results of this mutation can be affected by providing an authToken header to set a user for the operation.

CreateAssignmentSubmission(
body: String
videoAsset: String
asset: String
quizAttempt: ID
assignment: ID
course: ID!
): AssignmentSubmission!

Directives

authAccess

This requires the current user to be in STUDENT role.

Arguments

CreateAssignmentSubmission.body ● String scalar

The body of the assignment submission.

CreateAssignmentSubmission.videoAsset ● String scalar

The URL of the video asset.

CreateAssignmentSubmission.asset ● String scalar

The URL of the asset.

CreateAssignmentSubmission.quizAttempt ● ID scalar

The ID of the assessment attempt.

CreateAssignmentSubmission.assignment ● ID scalar

The ID of the assignment.

CreateAssignmentSubmission.course ● ID! non-null scalar

The ID of the course.

Type

AssignmentSubmission object

Examples

Run in Postman

Query:

CreateAssignmentSubmission(
$body: String,
$videoAsset: String,
$asset: String,
$quizAttempt: ID,
$assignment: ID,
$course: ID!
) {
CreateAssignmentSubmission(
body: $body,
videoAsset: $videoAsset,
asset: $asset,
quizAttempt: $quizAttempt,
assignment: $assignment,
course: $course
) {
id
assignment {
...AssignmentFragment
}
courseId
course {
...CourseFragment
}
user {
...UserFragment
}
asset
additionalAsset
videoAsset
body
commentsCount
numericGrade
grade
gradeFeedback
createdAt
updatedAt
quizAttempt {
...AssessmentAttemptFragment
}
adminUpdatedGrade
}
}

Variables:

{
"body": "abc123",
"videoAsset": "abc123",
"asset": "abc123",
"quizAttempt": "0e99a117-e3b6-40a6-867c-6b3bbc166b41",
"assignment": "0e99a117-e3b6-40a6-867c-6b3bbc166b41",
"course": "0e99a117-e3b6-40a6-867c-6b3bbc166b41"
}

Response:

{
"data": {
"CreateAssignmentSubmission": {
"id": "0e99a117-e3b6-40a6-867c-6b3bbc166b41",
"assignment": "Assignment",
"courseId": "course-1",
"course": "course-1",
"user": "User",
"asset": "URL",
"additionalAsset": "URL",
"videoAsset": "abc123",
"body": "abc123",
"commentsCount": 116,
"numericGrade": 326.65,
"grade": "completed",
"gradeFeedback": "abc123",
"createdAt": "2024-09-26T13:39:48.013Z",
"updatedAt": "2025-03-26T13:39:48.013Z",
"quizAttempt": "AssessmentAttempt",
"adminUpdatedGrade": false
}
}
}