Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Webhook SubscriptionCreate mutation creating deprecated version webhook

Webhook SubscriptionCreate mutation creating deprecated version webhook

quickstart-5297
Shopify Partner
3 0 1

After creating webhook with webhookSubscriptionCreate mutation, when I check the payload it shows API version 2020-01  and the version it self do not matches with my version of admin API. How can i mention API version while doing the mutation. 

 

I'm using Graphql with admin api version '2024-01'

 

The query: 

mutation webhookSubscriptionCreate($topic: WebhookSubscriptionTopic!, $webhookSubscription: WebhookSubscriptionInput!) {
  webhookSubscriptionCreate(
    topic: $topic
    webhookSubscription: $webhookSubscription
  ) {
    userErrors {
      field
      message
    }
    webhookSubscription {
      id
      metafieldNamespaces
      includeFields
      apiVersion {
        handle
        supported
      }
      createdAt
    }
  }
}


variables:
{
"topic": "PRODUCTS_DELETE",
"webhookSubscription": {
"callbackUrl": "https://abcd.trycloudflare.com/webhooks",
"format": "JSON"
}
}

 payload:

-{
  "data": {
    "webhookSubscriptionCreate": {
      "userErrors": [],
      "webhookSubscription": {
        "id": "gid://shopify/WebhookSubscription/1479423787327",
        "metafieldNamespaces": [],
        "includeFields": [],
        "apiVersion": {
          "handle": "2020-01",
          "supported": false
        },
        "createdAt": "2024-03-07T06:20:41Z"
      }
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 11,
      "actualQueryCost": 11,
      "throttleStatus": {
        "maximumAvailable": 2000,
        "currentlyAvailable": 1989,
        "restoreRate": 100
      }
    }
  }
}
Replies 0 (0)