Shopify JavaScript Buy SDK GraphQL products

webmeDa
New Member
2 0 0

Hi!

I need some help with JS Buy SDK. I'm not able to get all products through store front GraphQL. I'm trying to sort by inventory_total but it always fails. Any other sort method works fine. Does anybody know how to solve this?

Thanks in advance!Official docsOfficial docsRequest errorRequest errorDoesn't workDoesn't workWorksWorks

0 Likes
CalD
Shopify Staff
Shopify Staff
133 18 20

Hi @webmeDa,

The ProductSortKeys supported for the Admin API and Storefront API are slightly different - INVENTORY_TOTAL is only available in the Admin API.

Hope that helps!

CalD | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes