webhookSubscriptions : why is apiVersion 2020-01 (Unsupported)?

webhookSubscriptions : why is apiVersion 2020-01 (Unsupported)?

LetterT
Shopify Partner
53 5 19

Q: Why is the apiVersion 2020-01, and how do I / should I set it?

 

I'm using the Shopify GraphQL App to create a webhookSubscriptionCreate for APP_UNINSTALLED using: https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/webhookSubscriptionCreate

 

(The apiVersion is 2020-01 in my app also, even though it my app is set to 2024-04)

 

mutation webhookSubscriptionCreate($topic: WebhookSubscriptionTopic!, $webhookSubscription: WebhookSubscriptionInput!) {
  webhookSubscriptionCreate(topic: $topic, webhookSubscription: $webhookSubscription) {
    webhookSubscription {
      id
      topic
      format
      endpoint {
        __typename
        ... on WebhookHttpEndpoint {
          callbackUrl
        }
      }
    }
  }
}
{
  "topic": "APP_UNINSTALLED",
  "webhookSubscription": {
    "callbackUrl": "https://example.org/endpoint",
    "format": "JSON"
  }
}

When queried with:

query webhookSubscriptions($topic: [WebhookSubscriptionTopic!]) {
  webhookSubscriptions(first: 250, topics: $topic) {
    nodes {
      id
      topic
      apiVersion {
        displayName
        handle
        supported
      }
      createdAt
      updatedAt
      endpoint {
        ... on WebhookHttpEndpoint {
          __typename
          callbackUrl
        }
      }
    }
  }
}

 

gives:

  "data": {
    "webhookSubscriptions": {
      "nodes": [
        {
          "id": "gid://shopify/WebhookSubscription/1197962789072",
          "topic": "APP_UNINSTALLED",
          "apiVersion": {
            "displayName": "2020-01 (Unsupported)",
            "handle": "2020-01",
            "supported": false
          },
          "createdAt": "2024-05-03T06:53:37Z",
          "updatedAt": "2024-05-03T06:53:37Z",
          "endpoint": {
            "__typename": "WebhookHttpEndpoint",
            "callbackUrl": "https://example.org/endpoint"
          }
        }
      ]
    }
  },

 

 

Don't be shy, click that like button!
Replies 0 (0)