Skip to content

Add typed JSON output to app webhook trigger - #8817

Open
isaacroldan wants to merge 6 commits into
mainfrom
codex/json-app-webhook-trigger
Open

isaacroldan wants to merge 6 commits into
mainfrom
codex/json-app-webhook-trigger

Conversation

@isaacroldan

@isaacroldan isaacroldan commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Let scripts read webhook delivery results. Related to #23671.

WHAT is this pull request doing?

Add --json with the topic, API version, delivery method, address, and delivery status. Remote delivery reports enqueued; localhost delivery reports delivered after a successful HTTP response. JSON request and local delivery failures use the shared error document. Preserve text output and mask signing secrets in request diagnostics.

Text: Webhook has been enqueued for delivery.
JSON: {"status":"success","delivery":{"topic":"orders/create","apiVersion":"2026-10","deliveryMethod":"http","address":"https://example.com/webhooks","status":"enqueued"}}.

How to manually test your changes?

Use a linked test app and a local webhook handler.

  1. Run shopify app webhook trigger --topic orders/create --api-version <api-version> --address http://localhost:3000/webhooks --json > result.json. Check that the handler receives the sample and stdout has one result with delivery.status set to delivered.
  2. Make the handler return HTTP 500 and repeat. Expect one error object and a nonzero exit. Repeat without --json to compare the existing warning.
  3. Run shopify app webhook trigger --json-schema to inspect the delivery contract. Use an HTTPS address to check the remote enqueued result.

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
  • Added the required changesets

@github-actions github-actions Bot added shopify.dev preview Area: @shopify/cli @shopify/cli package issues labels Oct 7, 2026
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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

Built from 26cffccacc6f213112de2a617670391132dfcce9. 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-20261007115641

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/json-app-webhook-trigger branch from 4f0d976 to bb32942 Compare October 7, 2026 13:33
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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

Built from bb329424350659b92888318c8ea48373b867441e. 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-20261007133855

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

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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

Built from d758339995223f6b2aa5927cafb21425897f21c0. 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-20261007140407

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/json-app-webhook-trigger branch from d758339 to 6387532 Compare October 8, 2026 15:51
@isaacroldan
isaacroldan marked this pull request as ready for review October 8, 2026 16:03
@isaacroldan
isaacroldan requested review from a team as code owners October 8, 2026 16:03
@isaacroldan

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

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

Built from 638753200c4b3769284855940e9d9dd17448e73f. 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-20261009084819

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

Copy link
Copy Markdown
Contributor Author

/snapit

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

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

Built from 2157e4bc9f0ce5414b8b86fea846aa07411b4192. 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-20261009104727

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.

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.

2 participants