instructure/canvas-lms · error · GraphQL::ExecutionError

Stickers feature flag must be enabled

Error message

Stickers feature flag must be enabled

What it means

Guard in Mutations::UpdateSubmissionSticker#resolve: the stickers feature flag is not enabled on the root account, so the GraphQL mutation refuses to run and raises GraphQL::ExecutionError. It is a sentinel error for a feature-gated mutation, not a data problem.

Solutions

  1. Enable the submission_stickers feature flag at site, account, or course level (Feature Flags settings)
  2. Enable it in the Rails console: course.enable_feature!(:submission_stickers) or account.enable_feature!
  3. Hide/disable the sticker UI client-side when the flag is off
  4. Check with an admin if the flag is not visible in your account

Example fix

// before
updateSubmissionSticker(...) // flag off -> error
// after
if (course.featureEnabled('submission_stickers')) updateSubmissionSticker(...)
Defensive patterns

Strategy: validation

Validate before calling

if (!course.featureEnabled?.('submission_stickers')) return; // don't call the mutation

Type guard

const stickersEnabled = (c) => c?.featureEnabled?.('submission_stickers') === true

Try / catch

try { await gql(updateSubmissionStickerMutation, vars) } catch (e) { if (/feature flag/.test(e.message)) hideStickerUI(); else throw e }

Prevention

When it happens

Trigger: Calling updateSubmissionSticker in a course/account where the submission_stickers feature flag is off (site/account/course level).

Common situations: Feature not yet rolled out to the account; testing on a new course without enabling the flag; flag enabled for another course but not this one.

Related errors


AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15). Data as JSON: /api/errors/6cb0ffcdea04c917. Report an issue: GitHub.

Appendix: source

Thrown at app/graphql/mutations/update_submission_sticker.rb:38

class Mutations::UpdateSubmissionSticker < Mutations::BaseMutation
  argument :anonymous_id, ID, required: true
  argument :assignment_id, ID, required: true
  argument :sticker, Types::StickerType, required: false

  field :submission, Types::SubmissionType, null: false

  def resolve(input:)
    # Ideally we would use required: :nullable above for sticker, but it doesn't seem to work...
    raise GraphQL::ExecutionError, "'sticker' is required. Provide a value of null to remove a sticker" unless input.key?(:sticker)

    submission = Submission.find_by(
      root_account: context[:domain_root_account],
      assignment_id: input.fetch(:assignment_id),
      anonymous_id: input.fetch(:anonymous_id)
    )

    raise GraphQL::ExecutionError, "not found" if submission.nil? || !submission.grants_right?(current_user, :grade)
    raise GraphQL::ExecutionError, "Stickers feature flag must be enabled" unless submission.course.feature_enabled?(:submission_stickers)

    if submission.update(sticker: input.fetch(:sticker))
      { submission: }
    else
      errors_for(submission)
    end
  end
end

View on GitHub (pinned to 1c9f0bb801)