Skip to content

What happens when your Shopify API version leaves support

Shopify ships an Admin API version every quarter. When yours leaves support, requests fall forward to a newer one. How to find every version pin in your code.

Shopify2 min read

Short answer

Shopify releases a new Admin API version every quarter and supports each stable version for at least 12 months. When an app calls a version that is no longer supported, Shopify serves the request with the oldest supported version instead. Fields and behaviour from that newer version apply, even though your code did not change.

Shopify names its Admin API versions by year and month: 2024-01, 2024-04, 2024-07 and so on. Your app picks one in each client it creates. Nothing stops working on the day a version leaves support, which is the problem: the responses quietly start coming from a newer version.

Requests fall forward

When a request names an unsupported version, Shopify answers with the oldest version it still supports. If that version removed or reshaped a field your app reads, the change reaches production without a deploy. The fix is to upgrade on your own schedule, which means knowing every place your code pins a version.

Find every version pin

An app often creates more than one client: a GraphQL client for newer features, a REST client for older code, and a Python script somewhere else. Each can pin a different version. gitgo usages lists every Shopify client, the version each one pins, and each call it makes. This is its output on five small files:

Terminal
$ gitgo usages ./app
graphql.ts:4:16  shopify  client_init  createAdminApiClient
graphql.ts:4:86  shopify  version_pin  2024-04
graphql.ts:5:17  shopify  client_init  shopifyApi
graphql.ts:8:26  shopify  call  request
graphql.ts:13:19  shopify  client_init  shopify.clients.Graphql
graphql.ts:14:10  shopify  call  query
graphql_execute.py:5:5  shopify  call  GraphQL.execute
graphql_execute.py:6:12  shopify  call  GraphQL.execute
products.py:3:11  shopify  client_init  Session
products.py:3:49  shopify  version_pin  2024-01
products.py:4:1  shopify  client_init  ShopifyResource.activate_session
products.py:8:12  shopify  call  Product.find  GET /admin/api/{api_version}/products.json
products.py:12:12  shopify  call  Product.find  GET /admin/api/{api_version}/products/{id}.json
products.py:16:12  shopify  call  Order.find  GET /admin/api/{api_version}/orders.json
remix_graphql.ts:3:17  shopify  client_init  shopifyApp
remix_graphql.ts:12:22  shopify  call  admin.graphql
remix_graphql.ts:13:21  shopify  call  admin.graphql
rest.ts:3:17  shopify  client_init  shopifyApi
rest.ts:6:18  shopify  client_init  shopify.clients.Rest
rest.ts:6:66  shopify  version_pin  2024-01
rest.ts:7:22  shopify  call  get  GET /admin/api/{api_version}/products.json
rest.ts:8:9  shopify  call  put  PUT /admin/api/{api_version}/products/{id}.json

22 API usages in 5 files; 5 files scanned, 0 skipped

Three of the five files pin a version: two pin 2024-01 and one pins 2024-04. REST calls show the endpoint they hit. GraphQL calls from @shopify/admin-api-client, @shopify/shopify-api, @shopify/shopify-app-remix and the Python GraphQL class are listed too.

Check the REST changes between two versions

For REST, gitgo scan takes two OpenAPI descriptions of the Admin API and lists each line the change affects, as it does for Stripe. Shopify marked its REST Admin API as legacy in October 2024 and asks new public apps to use GraphQL. gitgo scan and gitgo diff also take two versions of the GraphQL Admin schema, as SDL or introspection JSON.

An upgrade checklist

  1. Run gitgo usages and note every version_pin.
  2. Pick one target version for all clients.
  3. For REST calls, run gitgo scan with the OpenAPI descriptions of the current and target versions, and fix each breaking line.
  4. For GraphQL calls, run gitgo scan with the current and target Admin schemas, then read Shopify's release notes for behaviour the schema does not show.
  5. Change every pin to the target version in one pull request, so no client is left behind.

Questions

How long does Shopify support an API version?
Each stable Admin API version is supported for at least 12 months after release. Shopify releases a new version every quarter.
How do I find which Shopify API version my app uses?
Look for the apiVersion option on each client your code creates, and the version string in REST URLs and Python sessions. gitgo usages lists every pin with its file, line and column.

Run it on your own code

The CLI is free and open source. It runs on your machine and sends nothing anywhere.