Stop reading the event ID and resource ID headers on events webhooks - #3365
Open
pobed2 wants to merge 1 commit into
Open
Stop reading the event ID and resource ID headers on events webhooks#3365pobed2 wants to merge 1 commit into
pobed2 wants to merge 1 commit into
Conversation
Shopify is dropping shopify-event-id and shopify-resource-id from events deliveries, so the libraries stop reading them. shopify-event-id was read with getRequiredHeader, so an events delivery without it would have failed validation with MissingHeaders once Shopify stopped sending it. Dropping the requirement is what makes this safe to ship ahead of the platform change. eventId and resourceId are gone from EventsWebhookFields and from the React Router and Remix webhook context. Webhooks are untouched: they keep the X-Shopify-Event-Id header and the eventId field, so the context type keeps eventId and its doc comment now says which kind of delivery sets it. Released as a minor: the breaking moment is when Shopify stops sending the header, not when the client stops reading it. TypeScript consumers that read either field off an events delivery will still see a compile error, which the changeset calls out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pobed2
marked this pull request as ready for review
August 18, 2026 20:09
lizkenyon
reviewed
Aug 20, 2026
lizkenyon
left a comment
Contributor
There was a problem hiding this comment.
So this is technically a breaking, so we have a couple of options
Option 1: Mark as major
What you do
- Keep the current PR code. The headers are no longer read.
- Change the changeset from minor to major.
- Regenerate the docs files.
- Write a migration note. Tell apps to use webhookId.
Option 2: Deprecate fields, keep similar behavior
What you do
- Stop requiring the shopify-event-id header. This is the validation fix.
- Keep eventId and resourceId in the public types.
- Keep ShopifyEventsHeader.EventId and ShopifyEventsHeader.ResourceId.
- Mark all four with @deprecated and a note.
- Fill eventId with a fallback value so it stays a string.
- Ship as a patch or minor.
- Remove the fields in the next major.
The fallback choice
eventId was a required string. If you keep the type but return nothing, callers get undefined. That is still a break for strict code.
To keep the string contract, set a fallback:
eventId: eventId ?? webhookId,Question for you:
Is this fallback acceptable based on what eventId and webhookId are intended to represent?
Context:
We try to minimize breaking changes and group them into a breaking change release.
But if semantically the fallback does not make sense, we would have to go ahead and do the breaking change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Shopify is dropping the
shopify-event-idandshopify-resource-idheaders from events deliveries, so the libraries should stop reading them.WHAT is this pull request doing?
Stops reading both headers.
shopify-event-idwas required, so events deliveries without it would have failed validation once Shopify stopped sending it.eventIdandresourceIdare also gone from the events result and the webhook context — usewebhookIdas the idempotency key. Webhooks are untouched and keepX-Shopify-Event-Id.Type of change
Checklist
pnpm changesetto create a draft changelog entry (do NOT update theCHANGELOG.mdfiles manually)