Versioning the API broke tools

Solved
Highlighted
Shopify Expert
3933 15 323

I use the Shopify CLI tool often enough to call it one of the things that makes working with Shopify somewhat pleasant. 

 

The code in that gem depends on the shopify_api. So when versioning was introduced, everyone and everything had to adapt. Failure to provide at least the default results in resource failures. Specifically, the Product endpoints. 

 

Turns out the SLI gem has no clue this versioning stuff is important, so it skips providing a version. And the API is not yet smart enough to supply a default, so the CLI gem borks. The simple solution is to add in a line of code to fix CLI in the site_from_config method:

 

     ShopifyAPI::Base.api_version = '2019-04'

 

With that, the CLI works again. So dear Shopify. You embraced your conversion to versioned API with gusto, but you left out a lot of small work you should be responsible for in your tools that you provide for us. Sure, we could help you out by fixing the tools you break, fair enough, but that is not really going to earn Shopify any developer brownie points. 

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
1 Like

Success.

Shopify Staff
Shopify Staff
15 3 9

Yes, sorry, we did miss that one in the initial launch. It will be fixed shortly.

0 Likes