If you're getting the results you want, then graphql is the way to go -- they announced the other day that moving forward the api is going to be implemented in graphql so we're all going to learn it, I think.
One way you can make things easier on yourself is to alias the result keys so that the code you write to handle the results is easier to read (and the raw results are easier to read as well). All you have to do is put a valid new name in front of whatever key you want to clarify, e.g. instead of name, you call it course_name, i.e. course_name: name
So for your query:
query GradesByAssignment($CourseCanvasID: ID) {
course(id: $CourseCanvasID) {
assignment_groups: assignmentGroupsConnection {
assignments: nodes {
assignment_name: name
grade_list: gradesConnection {
grades: nodes {
currentScore
enrollment {
user {
user_canvas_id: _id
user_display_name: name
} } } } } } } }
I'm not saying it buys you much, but sometimes graphql queries end up having a bunch of keys that are name or _id and it gets tedious to read.