commerce icon indicating copy to clipboard operation
commerce copied to clipboard

GraphQl descriptionHtml vs Webhook API body_html

Open MrUltimate opened this issue 4 months ago • 0 comments

Hi,

I'm facing a weird issue with Shopify's GraphQL API and the webhook API. I'm using NextJS to build my eCommerce site and that uses the GraphQL API to query for products. I am then trying to use on-demand revalidation for that when the client makes updates in Shopify, NextJS can automatically update it. Unforunately while the graphQL api has descriptionHtml the webhook API returns it as body_html.

Is there anyway to handle this in NextJS or get the webhook API to return object keys as how they appear in the GraphQL API? Has anyone run into an issue like this?

GraphQL: image

Webhook response: image

MrUltimate avatar Feb 08 '24 01:02 MrUltimate