parseShopifyWebhook
●tagtree · /shopify·function
Translates a Shopify webhook event into the set of tagtree cache tags that must be invalidated.
Signature
function parseShopifyWebhook(input: ShopifyParseInput<NS, T, Q, E>): string[];Parameters
| Name | Type | Description |
|---|---|---|
input | ShopifyParseInput<NS, T, Q, E> |
Returns
Array of cache tag strings to invalidate; empty when the topic is not mapped or the entity is absent from the schema.
Example
const tags = parseShopifyWebhook({
schema,
tenant: shop.domain,
topic: 'products/update',
body: JSON.parse(rawBody) as Record<string, unknown>,
});
for (const tag of tags) revalidateTag(tag);Related
ShopifyParseInput verifyShopifyHmac
MetadataOpen in GitHub ↗