GraphQL Get 3 Products with stock from each collection

sweikert
New Member
1 0 0

Hey,

i want to create a query that returns me 3 products with stock from each collection. My query is attached. My question is, how can filter the products?

{
	collections (first: 32 sortKey:UPDATED_AT, reverse:true) {
  	edges {
      node {
        title,
        updatedAt,
        products(first:3) {
          edges {
            node {
              id,
              title,
              totalInventory,
              tracksInventory
            }
          }
        }
      }
    }
	}
}

 

Thanks for helping
Stephan

0 Likes