Shopify-api-node icon indicating copy to clipboard operation
Shopify-api-node copied to clipboard

When using shopify order list api it gives data but shopify api helath-check give unsupported warning

Open jaydeep0621 opened this issue 1 year ago • 9 comments

image

jaydeep0621 avatar Jan 03 '24 18:01 jaydeep0621

One or more of your apps have made deprecated API calls in the last 14 days. Support for this version will be removed on January 2, 2024. Please update the apps listed below to API version or later and make the required updates outlined in the breaking changes section of the 2023-04 release.

jaydeep0621 avatar Jan 03 '24 18:01 jaydeep0621

I believe this is related to issue #632

Ryvix avatar Jan 05 '24 09:01 Ryvix

Yes @Ryvix

jaydeep0621 avatar Jan 05 '24 09:01 jaydeep0621

None of those properties are handled by shopify-api-node. The library forwards the input as is and returns the output as is.

lpinca avatar Jan 06 '24 17:01 lpinca

If it helps, all I know is that it only lists those deprecated properties, among others, in the interfaces within the types/index.d.ts file anywhere in my project. I don't know ts but I can't think of any other reason why it's saying they are being used when I'm not actually using them anywhere and the only place they're mentioned is in shopify-api-node.

Ryvix avatar Jan 06 '24 18:01 Ryvix

Try using the apiVersion option if it isn't already. If not specified, the oldest supported version is used.

lpinca avatar Jan 06 '24 19:01 lpinca

I am using the same version suggested by shopify i.e. 2023-04 but this health check .

jaydeep0621 avatar Jan 06 '24 19:01 jaydeep0621

You can reproduce any of this behavior in isolation by dropping the apiVersion

Because you have not specified a version this package will do a call like this: https://MYSTORE.myshopify.com/admin/orders/XXXXXXX.json instead of something like this https://MYSTORE.myshopify.com/admin/api/2024-01/orders/XXXXXXX.json

You'll notice that when the api/version part is dropped, Shopify will return an order object that includes deprecated things like "delivery_category":null or "gateway": "shopify_payments" etc...

When you inspect the headers you'll see x-shopify-api-version is 2023-01. A deprecated version.

It's unclear to me why Shopify does this and subsequently complains that people are using deprecated properties but that does seem to be what is happening.

Perhaps the part about oldest supported stable version. in the README needs to be changed?

Optional - A string to specify the Shopify API version to use for requests. Defaults to the oldest supported stable version.

If the default is an unsupported version, is it still a usable default? I'd argue this isn't an optional parameter at this point.

sdrib avatar Jan 11 '24 19:01 sdrib

@sdrib it now returns 2023-04 as expected. I guess there is a grace period.

lpinca avatar Feb 09 '24 19:02 lpinca