Skip to content

Add typed JSON output to app webhook trigger - #8817

Merged
isaacroldan merged 6 commits into
mainfrom
codex/json-app-webhook-trigger
Oct 13, 2026
Merged

isaacroldan merged 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/[email protected]

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/[email protected]

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/[email protected]

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/[email protected]

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/[email protected]

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 added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2026
@isaacroldan
isaacroldan added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 6741651 Oct 13, 2026
31 checks passed
@isaacroldan
isaacroldan deleted the codex/json-app-webhook-trigger branch October 13, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants