canvas-lms icon indicating copy to clipboard operation
canvas-lms copied to clipboard

GraphQL: add the support for retrieving enrollment data for given section within a course

Open zqian opened this issue 2 years ago • 0 comments

Summary:

A Canvas course could contain multiple sections. We have the need to retrieve Enrollment data (with course grade information) for given section.

However, Canvas GraphQL does not support the section query now. We have to use the following query for course, and then filter out section enrollments:

Steps to reproduce:

query MyQuery { course(id: 111111) { enrollmentsConnection(last: 999) { pageInfo { endCursor startCursor } nodes { grades { finalScore finalGrade customGradeStatusId currentScore currentGrade enrollment { user { loginId name sisId } } } } } } }

Expected behavior:

It would be ideal for Canvas GraphQL to provide section endpoint, with id and sis_id params, and enrollmentConnection object.

zqian avatar Nov 17 '23 02:11 zqian