Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
For a simple call to the API as follows:
mutation ($topic: WebhookSubscriptionTopic!, $callbackUrl: URL!) { webhookSubscriptionCreate( topic: $topic, webhookSubscription: { callbackUrl: $callbackUrl, format: JSON }) { userErrors { field message } webhookSubscription { id callbackUrl } } }
Why am I getting a Deprecation warning on the `2022-07` and `2022-10` versions?
Sagar @ Avyya - Modern Sales Booster
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Solved! Go to the solution
This is an accepted solution.
The `WebhookSubscription.callbackUrl `field is deprecated as of 2022-07. You will want to use `WebhookSubscription.endpoint` when referencing the object field instead, and fragment on `WebhookSubscriptionEndpoint`.
mutation webhookSubscriptionCreate(
$wst: WebhookSubscriptionTopic!,
$wsi: WebhookSubscriptionInput!) {
webhookSubscriptionCreate(topic: $wst, webhookSubscription: $wsi) {
webhookSubscription {
id
endpoint {
... Endpoints
}
}
}
}
fragment Endpoints on WebhookSubscriptionEndpoint {
... on WebhookEventBridgeEndpoint {
arn
}
... on WebhookHttpEndpoint {
callbackUrl
}
... on WebhookPubSubEndpoint{
pubSubProject
pubSubTopic
}
}
Keep in mind, this change is for the `WebhookSubscription` object, not the `WebhookSubscriptionInput` input object for the `webhookSubscriptionCreate` mutation.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
The `WebhookSubscription.callbackUrl `field is deprecated as of 2022-07. You will want to use `WebhookSubscription.endpoint` when referencing the object field instead, and fragment on `WebhookSubscriptionEndpoint`.
mutation webhookSubscriptionCreate(
$wst: WebhookSubscriptionTopic!,
$wsi: WebhookSubscriptionInput!) {
webhookSubscriptionCreate(topic: $wst, webhookSubscription: $wsi) {
webhookSubscription {
id
endpoint {
... Endpoints
}
}
}
}
fragment Endpoints on WebhookSubscriptionEndpoint {
... on WebhookEventBridgeEndpoint {
arn
}
... on WebhookHttpEndpoint {
callbackUrl
}
... on WebhookPubSubEndpoint{
pubSubProject
pubSubTopic
}
}
Keep in mind, this change is for the `WebhookSubscription` object, not the `WebhookSubscriptionInput` input object for the `webhookSubscriptionCreate` mutation.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog