Graphql Products published count

Highlighted
New Member
5 0 0

I need product counts to show number of pages it takes, But i had i retrieve the product on product hierarchy and i also want the total count of the current filtered products

Query

query Myquery($query: String!, $sortKey:ProductSortKeys!, $reverse:Boolean!) {
products(query: $query, first: 10, sortKey:$sortKey, reverse:$reverse) {
    edges {
      node {
        id
        title
        variants(first:10){
      		edges{
            node{
              price
            }
          }
        }
     }
   }
 }
}

Variable

{
  "query": "tag:Shirts variants.price:>=3270 variants.price:<=3407",
  "sortKey": "TITLE",
  "reverse": true
}

I want to get all available products under given filter conditions

 

0 Likes