Found this content helpful? Log in or sign up to leave a like!

Change of behavior of Grphiql getting submissions

PepeGimenez
Community Explorer

I have been working for a while, and I have had the following query to get all submissions in a course:

query MyQuery {
  course(id: "22424") {
    submissionsConnection {
      nodes {
        grade
        assignment {
          name
        }
        user {
          _id
          enrollments(courseId: "22424") {
            type
          }
        }
      }
    }
  }
}

I'm encountering an issue with my script that interacts with the Canvas API. Previously, it successfully retrieved all submissions for all assignments within a course. However, recently, the script's behavior has changed, and it now only fetches the submissions for the first assignment, instead of all of them. I've confirmed this behavior across two separate university Canvas environments, suggesting it's not an isolated issue.

My questions are:

  • Have there been any recent changes to the Canvas API, particularly concerning the endpoints or pagination for assignment submissions, that could explain this behavior?
  • What is the current recommended approach or what API adjustments are needed to correctly retrieve all submissions for all assignments?

 

 

 

Labels (1)
0 Likes