Overview
In some cases, we will need to make use of an unstable API, while the rest of the time, the app should be using the latest stable version of the API.
A good example is the new app events API.
We would like to leverage this API, but we're not able to, because we need to either configure the ShopifyApp gem to use the unstable API endpoint for everything or we need to write a small API client specifically for accessing the unstable API.
That's not ideal.
I'm not 100% sure how to make this possible, but ideally we would do something like this:
shop.with_shopify_session(api_version: "unstable") do |session|
session.query(query: GET_ORDER, variables: { id: "gid://shopify/Order/123" })
end
Overview
In some cases, we will need to make use of an unstable API, while the rest of the time, the app should be using the latest stable version of the API.
A good example is the new app events API.
We would like to leverage this API, but we're not able to, because we need to either configure the
ShopifyAppgem to use theunstableAPI endpoint for everything or we need to write a small API client specifically for accessing the unstable API.That's not ideal.
I'm not 100% sure how to make this possible, but ideally we would do something like this: