Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shopify GraphQL. I want to have a list of products for specific collection based on location.

Shopify GraphQL. I want to have a list of products for specific collection based on location.

Sandrik
Shopify Partner
2 0 0

Shopify GraphQL. I want to have a list of products for specific collection based on location.

Expectrd list of products. I tried:

query($collectionId: ID!, $locationId: ID!) {
  collection(id: $collectionId) {
    products(first: 50) {
      edges {
        node {
          id
          title
          availableForSale
          images(first: 50) {
            edges {
              node {
                id
                altText
                originalSrc
              }
            }
          }
          variants(first: 50, query: "location_id:$locationId") {
            edges {
              node {
                id
                title
                inventoryQuantity
                sku
              }
            }
          }
        }
      }
    }
  }
}

But I have an error for variants not support query

Replies 0 (0)