Skip to content

Add typed JSON output to app bulk cancel - #8782

Open
isaacroldan wants to merge 2 commits into
codex/app-bulk-status-jsonfrom
codex/app-bulk-cancel-json
Open

isaacroldan wants to merge 2 commits into
codex/app-bulk-status-jsonfrom
codex/app-bulk-cancel-json

Conversation

@isaacroldan

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Give callers a typed JSON result for cancelling a bulk operation, with failures through the standard CLI error contract.

WHAT is this pull request doing?

Add JSON output for app bulk cancel on top of the status layer's shared bulk-operation contract. Return domain data from execution and keep cancellation banners and status-command guidance in the presenter. Preserve text-mode behavior and refresh the generated command documentation.

Representative text output:

Bulk operation is being cancelled.
This may take a few moments. Check the status with:
shopify app bulk status --id=123

Matching JSON output:

{
  "storeDomain": "shop.myshopify.com",
  "apiVersion": "2026-01",
  "status": "success",
  "operation": {
    "gid": "gid://shopify/BulkOperation/123",
    "type": "QUERY",
    "status": "CANCELING",
    "errorCode": null,
    "createdAt": "2026-09-01T00:00:00Z",
    "completedAt": null,
    "objectCount": "2",
    "url": null,
    "partialDataUrl": null
  }
}

How to manually test your changes?

Use a linked app installed on a development store and a disposable bulk operation.

  1. Run pnpm shopify app bulk cancel --store <store.myshopify.com> --id <operation-id>. Confirm the existing cancellation banner and status-command hint.
  2. Cancel another disposable operation with --json. Confirm one result document on stdout and diagnostics on stderr.
  3. Repeat with an invalid operation ID. JSON mode should report a structured error, not a successful cancellation result.
  4. Run pnpm shopify app bulk cancel --json-schema.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing; a minor changeset is included.

@isaacroldan
isaacroldan requested review from a team as code owners October 6, 2026 08:29
@github-actions github-actions Bot added shopify.dev preview Area: @shopify/cli @shopify/cli package issues labels Oct 6, 2026
@isaacroldan
isaacroldan added this pull request to stack #8784 October 6, 2026 08:30
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm.

Built from 7e7a140977a537348afe88474ac4a6a0268af0b2. Workflow run.

Test the snapshot by installing your package globally:

pnpm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20261006083335

Caution

After installing, validate the version by running shopify version in your terminal.
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@isaacroldan
isaacroldan force-pushed the codex/app-bulk-cancel-json branch from 7e7a140 to 34ea924 Compare October 6, 2026 10:00
@isaacroldan
isaacroldan removed this pull request from stack #8784 October 6, 2026 10:03
@isaacroldan
isaacroldan added this pull request to stack #8789 October 6, 2026 10:03
@isaacroldan
isaacroldan force-pushed the codex/app-bulk-cancel-json branch from 34ea924 to e7baa3a Compare October 6, 2026 16:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant