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

How to fetch products with high to low or low to high sorting #1028

Closed deveshprk96 closed 5 years ago

deveshprk96 commented 5 years ago

Please complete the checklist before filing an issue:

None of the above? Create an issue. Be sure to include all the necessary information for us to understand and reproduce the problem:

If there's not enough information to address the problem, we'll tag your issue with information required and close it until further information is provided.

vixdug commented 5 years ago

Hi @deveshprk96 As the checklist points out, this would be a great question for our forums. You can use sort keys for this. You can see the reference here: https://help.shopify.com/en/api/storefront-api/reference/enum/productsortkeys

It would look something like this in the GraphQL query:

{
  shop {
    products(first: 10, query: "", sortKey: ) {
      edges {
        node {
          ...
        }
      }
    }
  }
}