Canvas GraphQL API Missing Data

Jump to solution
maxrosoff
Community Member

How do I retrieve the submission history for an assignments with GraphQL? In the REST API you need to manually specify to include submission_history. This is one of many fields that is seemingly inaccessible, is there any plans to bring the GraphQL API to feature parity?

/api/v1/courses/:courseId/students/submissions?include[]=submission_history

Thanks!

Labels (1)
0 Likes
1 Solution
James
Community Champion

@maxrosoff 

By online_quiz, you probably mean Classic Quiz. Support for Classic Quizzes in GraphQL is extremely limited. One of the few things dealing with Classic Quizzes in GraphQL is whether an assignment is a quiz and what the quiz ID is. That's about it. Generally speaking, if you want anything related to Classic Quizzes, you'll want to use the REST API rather than GraphQL.

On the back-end, multiple assignment submissions are handled by the submission_history table, which is what GraphQL is linking up against. However, for Classic Quizzes, they're part of the quiz_submission_history table. That goes to the lack of support for Classic Quizzes in GraphQL. Since Canvas wants all of us to stop using Classic Quizzes and they've stopped any real development on them, do not look for that support to be added to GraphQL.

View solution in original post

0 Likes