Conversation
76a75f9 to
79e778b
Compare
mllemango
left a comment
There was a problem hiding this comment.
did we want to implement something similar to the python library where we can automatically fetch the API versions? https://github.com/Shopify/shopify_python_api/blob/master/shopify/api_version.py#L30
|
Fetching the versions is interesting, but I don't think we can define a Typescript type around a network request - the type needs to be defined at transpilation time, before we have a chance to run the request. |
I had read that the Ruby shopify-api package so I had expected that this package worked similarly. Perhaps there is a method that can be adopted from that package?
|
|
I don't think it would work as far as defining a type goes, since I don't think we'd be able to create a type programatically (Typescript types are 'gone' by the time the code is running). As someone mentioned on the original issue it should be possible to just use a plain string if the option isn't there. The type just translates that to a more readable format. We can look into this in the future, as long as people are able to work around missing values in the enum in some way (in this case, using a plain string). If that fails for some reason we can address it as a bug, otherwise it'll be something for the future. |
WHY are these changes introduced?
Fixes #116
The
2021-01API version was missing from the version options.WHAT is this pull request doing?
Adding the missing version.
Type of change
Checklist