Use static endpoint URLs

Shopify has a strict API policy, it removes an API version every quarter.

If an action referenced an unsupported API version then the action would stop working.

Cloudhooks can upgrade your API endpoints automatically.
It requires that the endpoints are static strings in your hook's code.

As an example, don't do this:

const apiVersion = '2023-01';
const shopResult = await actions.shopify.graphql(
  `/admin/api/${apiVersion}/graphql.json`,
  'query { shop { name } }'
)

Use static endpoints instead:

const shopResult = await actions.shopify.graphql(
  `/admin/api/2023-01/graphql.json`,
  'query { shop { name } }'
)

Alternatively, leave out 'api/API_VERSION', and the lowest-supported API endpoint will be called:

const shopResult = await actions.shopify.graphql(
  `/admin/graphql.json`,
  'query { shop { name } }'
)