Shopify / mobile-buy-sdk-ios

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using Apple Pay or their credit card.
MIT License
452 stars 199 forks source link

Storefront API versioning #1014

Closed caisd1998 closed 5 years ago

caisd1998 commented 5 years ago

Current 3.4 sdk is using "/api/graphql" which has no api versioning, but Storefront API has api versioning now according to https://help.shopify.com/en/api/versioning. I think now every sdk version needs to combine with a specific stable Storefront API version, but there is a problem, since sdk is embedded in app, after one year the api version is not supported and the app may be crashed, maybe this is the known issue we have to live with. If user forgets to update SDK when upgrading app, problem will be bigger.

If your app calls a stable version that is no longer supported, then Shopify falls forward and responds to your request with the same behaviour as the oldest supported stable version. For example, in April 2020, API requests that call version 2019-04 will be served version 2019-07, because that will be the oldest supported stable version.

If your request doesn't include a version, then the API also defaults to the oldest supported stable version.

dbart01 commented 5 years ago

The current and latest SDK version is 3.6 (not 3.4) and it is locked to 2019-07 schema. You're right that version staleness is a problem but that will need a solution on the client via app updates or other means. I would encourage you to update your apps with every API release cycle, anyway, to take advantage of new features and upgrades.

rebeccajfriedman commented 5 years ago

From our API Versioning guide: If your request doesn't include a version, then the API also defaults to the oldest supported stable version.

@dbart01 is right that you should be updating your apps with every API release, as functionality may change between different releases.