The expireStudentCourseAccess mutation allows you to mark a student’s course access as expired while retaining their course data. This is useful when you want to temporarily revoke a student’s access without removing their progress and enrollment records.
Input Parameters
Field
Type
Description
userId
String!
ID of the student (User) whose access should be expired
courseId
String!
ID of the course to expire access for
customEndedAt
Int
Custom expiration date (Unix Timestamp). Defaults to current time
reason
String
Optional reason for expiring the access
Return Fields
The updated enrollment with expired access(StudentCourseShip).
Field
Type
Description
id
String!
id of the enrollment
completionRate
Float
the completion rate of the enrolled course which student achieved
course
AdminCourse!
information of the enrolled course
user
AdminUser!
user information of the enrolled course
updatedAt
Int!
last updated date of the enrollment
createdAt
Int!
created date of the enrollment
endedAt
Int
expiration date for the enrollment (Unix Timestamp)