Wrong webhook api version in graphql result

I’m using pubSubWebhookSubscriptionCreate to create webhooks as part of rest to graphql migration. The GraphQL response includes apiVersion as 2023-01 (unsupported). In my Shopify Admin app settings, it’s set to 2024-04.

As far as I understand, we can’t set the API version while creating it anymore. So, can we say that the apiVersion in the result is deprecated?

mutation MyMutation {
  pubSubWebhookSubscriptionCreate(
    topic: APP_UNINSTALLED
    webhookSubscription: {pubSubProject: "", pubSubTopic: ""}
  ) {
    webhookSubscription {
      createdAt
      updatedAt
      apiVersion {
        handle
        displayName
        supported
      }
      id
      format
    }
  }
}

When your selected API version becomes unsupported, Shopify falls forward to using the next supported stable version.
The current supported stable version is 2024-04

So, can we say that the apiVersion in the result is deprecated?

No. It is not deprecated. You can see it is included in the response.
Please check the documentation.

@remy727, the 2023-01 API version is not selected anywhere. The version selected in the Partner API is 2024-04, and webhook creation calls do not include a version parameter at all.

Since it’s not functioning properly at the moment, the question for the Shopify dev team is whether this field will no longer be used and marked as deprecated, or if it will be fixed.

Any thoughts, @Liam-Shopify?

Hi @Merchbees, are you setting the version from the partners dashboard like in these instructions?

The GraphQL API should show the version that is selected in the partners dashboard, both with the create mutations and queries. I did a quick test toggling the versions around in the API and calling both the pubSubWebhookSubscriptionCreate mutation and webhookSubscriptions query and confirmed the version was being updated in the response as expected. Note it can take up to a minute or so for the version changed from the partners dashboard to fully deploy. The change will effect all existing webhook subscriptions.

If you aren’t seeing this, have you saved the version on the partners page lately? I’m wondering if maybe you actually have an older version set which the API is displaying and the partners dash is showing the rolled-forward version which would be 2024-04.

1 Like

Hey @Dave-Shopify,

This is regarding the dev application. You are correct—when I checked the returned resource from the query, it shows the version as:

"webhookApiVersion": "2023-01"

Since the UI displays 2024-04, I assumed that version was already selected. It seems the UI is showing the rolled-forward version instead.

Thanks,