[Shopify] Limit webhook subscription payload fields - #11658
Onat Buyukakkus (onbuyuka) wants to merge 1 commit into
Conversation
Add topic-specific includeFields when creating Shopify webhook subscriptions so order-created callbacks send only the order ID and bulk-operation callbacks send only the fields consumed by the connector. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 222c9414-c7a8-4bd7-9eb9-0224ae33f4a3
Good Sense Reviewer - Round 1Recommendation: Accept with SuggestionsWhat this PR doesThis change limits Shopify webhook subscription payloads by passing topic-specific Problem-solution fitFit: Strong The reported problem is that webhook subscriptions without a field list receive more payload data than the connector needs. The diff directly changes subscription creation and keeps the downstream handling aligned with the smaller payload. SuggestionsS1 (🟠 Moderate): Add request-body assertions for includeFields Risk assessment and necessityRisk: The regression surface is limited to newly created or recreated Shopify webhook subscriptions. If the field list is wrong, subscription creation can fail or a callback can miss the ID/type data that the connector expects, but this does not touch posting, ledger entries, or stored financial data. Necessity: The change is justified because the connector only needs small topic-specific fields from these callbacks. The scope is narrow and avoids changing existing subscriptions automatically.
|
What & why
Shopify sends the full webhook resource when
includeFieldsis omitted. The connector usesorders/createonly as a synchronization trigger, and the bulk-operation callback only consumes the operation ID and type.This change adds topic-specific
includeFieldswhen creating webhook subscriptions:ORDERS_CREATE:idBULK_OPERATIONS_FINISH:admin_graphql_api_id,typeLinked work
Fixes AB#650501
How I validated this
What I tested and the outcome
Risk & compatibility
Existing Shopify subscriptions are not modified automatically. The reduced payload applies when a subscription is newly created or recreated. No schema, permission, or upgrade changes are included.