Skip to main content

cancelStorefrontPageGeneration

Requires permission storefront:storefront:update.

Stop a page-generation job. Aborts the model call when this API instance runs the job and returns it CANCELLED; on another instance the job stops at its next model turn, so keep polling. A job that already ended is returned unchanged. Credits already charged stay charged (creditsUsedCents).

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation CancelStorefrontPageGeneration($jobId: ID!) {
cancelStorefrontPageGeneration(jobId: $jobId) {
status
costDisplay
creditsUsedCents
error
jobId
page
}
}

Variables:

{
"jobId": "id"
}

Response:

{
"data": {
"cancelStorefrontPageGeneration": {
"status": "CANCELLED",
"costDisplay": "string",
"creditsUsedCents": 0,
"error": "string",
"jobId": "id",
"page": {}
}
}
}
cancelStorefrontPageGeneration(
jobId: ID!
): StorefrontPageJob!

Arguments​

cancelStorefrontPageGeneration.jobId ● ID! non-null scalar​

The ID of the page generation job.

Type​

StorefrontPageJob object​

A started storefront page generation.