webhook format for GraphQL fields
Overview
For webhooks created via GraphQL, webhook data is still in REST format instead of https://shopify.dev/api/admin-graphql/2022-04/objects/Product#fields
eg product has created_at instead of createdAt, body_html instead of descriptionHtml, no media list (but has images)
Proposal: have a new format at WebhookSubscriptionFormat
such as JSON_GRAPHQL, which will send webhooks data in format matching
https://shopify.dev/api/admin-graphql/2022-04/objects/Product#fields
Type
- [ ] New feature
- [x] Changes to existing features
Motivation
What inspired this feature request? What problems were you facing?
Using GraphQL and being consistent in handling data
Area
- [ ] Add any relevant
Area: <area>labels to this issue
Checklist
- [x] I have described this feature request in a way that is actionable (if possible)
when do we expect this issue will be resolved? I need a media list on the webhook
This issue is stale because it has been open for 90 days with no activity. It will be closed if no further action occurs in 14 days.
not stale
This issue is stale because it has been open for 90 days with no activity. It will be closed if no further action occurs in 14 days.
not stale
I desperately need this. Any update?
This is not a limitation of the library but of the underlying GraphQL implementation.
To direct this feedback to the team supporting the WebhookSubscriptionFormat enum, please use the "Was this section helpful?" feedback mechanism under the Valid values section of WebhookSubscriptionFormat - that feedback mechanism directs a GitHub issue to the appropriate GraphQL API team for their review.
Hi! I see this issue is quite old. Was anyone able to figure this out? I'm using graphQl to generate my pages using NextJS. However, when I trigger a webhook revalidation, the returned key for decription is description_html and not descriptionHtml like it is in graphQl. How can I handle this in my code?