instructure/canvas-lms · error · GraphQL::ExecutionError
Assignment overrides are not allowed in the parent…
Error message
Assignment overrides are not allowed in the parent assignment for checkpoints.
What it means
When creating/updating a parent assignment with `for_checkpoints: true` (discussion checkpoints), providing `assignment_overrides` is invalid; AssignmentBase.prepare_overrides! raises instead of applying them. Checkpoint sub-assignments carry their own overrides, so overrides on the parent are disallowed.
Solutions
- Remove assignmentOverrides from the input when forCheckpoints is true.
- Apply overrides to the checkpoint sub-assignments after the parent is created instead.
- Only include forCheckpoints: true if you actually intend checkpoint behavior.
- Branch client code: build separate payloads for checkpoint vs regular assignments.
Example fix
// before
updateAssignment(input: { id, forCheckpoints: true, assignmentOverrides: [...] })
// after
updateAssignment(input: { id, forCheckpoints: true }) // no overrides on parent
// set overrides on each checkpoint assignment separately Defensive patterns
Strategy: validation
Validate before calling
if input.forCheckpoints && input.assignmentOverrides?.length
throw new Error('Remove assignmentOverrides for checkpoint parents')
Try / catch
try {
await updateAssignment(input)
} catch (e) {
if (e.message.includes('overrides are not allowed')) stripOverridesAndRetry()
} Prevention
- Build input objects conditionally for checkpoint mode
- Never blanket-serialize all assignment fields
- Add client-side schema for checkpoint payloads
When it happens
Trigger: A createAssignment/updateAssignment mutation that includes both `forCheckpoints: true` and a non-empty `assignmentOverrides` array.
Common situations: Migrating existing assignment code to the checkpoints model and reusing the same input payload; UI sending default override sets unconditionally; clients copying payloads from non-checkpoint assignment calls.
Related errors
- Cannot set # in the parent assignment for checkpoints.
- A maximum of 50 assessees can be provided at once
- A maximum of 50 assessors can be provided at once
- All ConversationMessages must exist within the same…
- Anonymous assignments must be manually posted
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/6a8925d43af8d6a8.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/assignment_base.rb:211
input_hash[:assignment_group_id] = GraphQLHelpers.parse_relay_or_legacy_id(input_hash[:assignment_group_id], "AssignmentGroup")
end
if input_hash.key? :group_set_id
input_hash[:group_category_id] = GraphQLHelpers.parse_relay_or_legacy_id(input_hash.delete(:group_set_id), "GroupSet")
end
input_hash
end
def prepare_module_ids!(input_hash)
if input_hash.key? :module_ids
input_hash.delete(:module_ids).map { |id| GraphQLHelpers.parse_relay_or_legacy_id(id, "Module") }.map(&:to_i)
end
end
def prepare_overrides!(input_hash, api_proxy)
if input_hash.key?(:assignment_overrides) && input_hash[:assignment_overrides].present?
if input_hash[:for_checkpoints]
raise GraphQL::ExecutionError, "Assignment overrides are not allowed in the parent assignment for checkpoints."
end
api_proxy.load_root_account
input_hash[:assignment_overrides].each do |override|
if override[:id].blank?
override.delete :id
else
override[:id] = GraphQLHelpers.parse_relay_or_legacy_id(override[:id], "AssignmentOverride")
end
override[:course_section_id] = GraphQLHelpers.parse_relay_or_legacy_id(override[:section_id], "Section") if override.key?(:section_id) && override[:section_id].present?
override[:group_id] = GraphQLHelpers.parse_relay_or_legacy_id(override[:group_id], "Group") if override.key?(:group_id) && override[:group_id].present?
override[:student_ids] = override[:student_ids].map { |id| GraphQLHelpers.parse_relay_or_legacy_id(id, "User") } if override.key?(:student_ids) && override[:student_ids].present?
end
end
end
def prepare_moderated_grading!(input_hash)
if input_hash.key? :moderated_gradingView on GitHub (pinned to 1c9f0bb801)