Open
Conversation
737ac05 to
93ea394
Compare
93ea394 to
bfb32ce
Compare
The webhook subTopic feature was deprecated in API version 2024-04 and fully removed in 2024-07. This commit removes all traces of subTopic from the codebase. Changes: - Remove ShopifyHeader.SubTopic enum value - Remove subTopic from WebhookHandlerFunction, BaseWebhookHandler, and WebhookFields types - Remove subTopic validation and processing logic - Remove subTopic from GraphQL mutation building - Remove subTopic from Remix and React Router webhook context - Remove related tests and documentation Related to: shop/issues-event-foundations#128 Related PR: Shopify/shopify-dev#65578 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change version bump from minor to major - Add comprehensive migration guide to changeset - Add clarifying comment to validate.ts
Verifies the context parameter is correctly received at position 6 after the subTopic parameter was removed from the callback signature.
bfb32ce to
c8c5188
Compare
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.
Summary
Removes the deprecated
subTopicfield from all webhook types, handlers, validation, registration, and context objects across@shopify/shopify-api,@shopify/shopify-app-remix, and@shopify/shopify-app-react-router. ThesubTopicfeature was deprecated in API version 2024-04 and fully removed in 2024-07 — apps should use webhook filters instead.This is a major version bump for all three packages.
Related to: https://github.com/shop/issues-event-foundations/issues/128
Related PR: https://github.com/Shopify/shopify-dev/pull/65578
Changes
@shopify/shopify-apiShopifyHeader.SubTopicenum value fromlib/types.tssubTopicfromWEBHOOK_HEADER_NAMESmap inlib/webhooks/types.tssubTopicparameter fromWebhookHandlerFunctionsignaturesubTopicfromBaseWebhookHandlerandWebhooksWebhookFieldsinterfacessubTopicheader extraction invalidate.ts→checkWebhooksHeaders()subTopicdestructuring and callback argument inprocess.tssubTopicfrom GraphQL mutation building inregister.tssubTopicsection fromaddHandlers.mdreference docsHTTP_HANDLER_WITH_SUBTOPICtest fixture, subtopic-specific tests, andassertWebhookRegistrationRequestsubTopic parameter@shopify/shopify-app-remix&@shopify/shopify-app-react-routersubTopicfrom the webhookContextinterface (field + JSDoc)subTopic: check.subTopic || undefinedfromauthenticateWebhookFactoryChangeset
Testing
Automated
npx turbo run build --filter=@shopify/shopify-api --filter=@shopify/shopify-app-remix --filter=@shopify/shopify-app-react-routersubTopic/SubTopic/sub_topicreferences in*.tsfiles (only unrelatedpubSubTopic)Manual Testing Steps
subTopicparametersubTopicarg)authenticate.webhook()context in Remix/React Router no longer exposessubTopicBreaking Changes
@shopify/shopify-apiWebhookHandlerFunctionsignature dropssubTopicparameter;BaseWebhookHandler.subTopicremoved;ShopifyHeader.SubTopicremoved@shopify/shopify-app-remixsubTopicremoved from webhook context type@shopify/shopify-app-react-routersubTopicremoved from webhook context typeMigration: Replace
subTopicusage with webhook filters. See the changeset for detailed before/after examples.