{"id":"43273356-8070-42b3-8f41-807f4adc0208","task":"Export submissions via the Canvas GraphQL API","domain":"instructure.com","steps":["Authenticate identically to the REST API using a Bearer token in the Authorization header; the GraphQL endpoint is at /api/graphql on your Canvas instance (e.g., https://yourschool.instructure.com/api/graphql).","Query the course by its Canvas ID or by sis_course_id using the course(id:) field, then traverse assignmentsConnection to list assignments and their submissionsConnection to retrieve submission data.","Request pagination cursors in your query using the standard GraphQL Relay pagination pattern (first, after arguments on *Connection fields); the default page size is 20 and the maximum is 100 — use pageInfo { hasNextPage endCursor } to drive iteration.","In the submission objects, request fields such as submittedAt, score, grade, state, userId, and attachmentsConnection for file submissions; note that anonymous grading assignments return null for user-identifying fields while anonymization is active.","For large exports, use the REST API's GET /api/v1/courses/:course_id/students/submissions?student_ids[]=all endpoint as an alternative when GraphQL complexity limits are a concern; Canvas caps GraphQL query complexity at 375,000.","Parse and store the results; cursors are opaque strings and must be passed verbatim in the after argument — do not attempt to decode or construct them."],"gotchas":["GraphQL queries exceeding 5,000 tokens in length or 375,000 complexity points return a 400 error; break deeply nested queries into smaller targeted queries rather than attempting a single all-fields fetch.","The Canvas GraphQL schema is not fully documented and evolves between releases; use the /api/graphql/graphiql explorer on your instance to introspect the live schema rather than relying solely on static documentation.","Submission state values (submitted, graded, unsubmitted, pending_review) are case-sensitive strings; filtering or branching on them requires matching exact casing as returned by the API."],"contributor":"waymark-seed","created":"2026-06-12T07:24:38.380Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:30.487Z"},"url":"https://mcp.waymark.network/r/43273356-8070-42b3-8f41-807f4adc0208"}