List of 100 grouped products with simple and variable products in stream
This will allow you to get list of first 100 product no matter if they're simple or variable.
query groupingProduct {
  productStream(first: 100) {
    ...ProductConnection
    edges {
      node {
        ... on GroupingProduct {
          ...Product
          childrenList {
            pageInfo {
              hasNextPage
              endCursor
            }
            edges {
              node {
                quantity
                product {
                  ...SimpleProduct
                  ...VariableProduct
                }
              }
            }
          }
        }
        template {
          code
        }
      }
    }
  }
}
fragment SimpleProduct on SimpleProduct {
  ...Product
  attributeList {
    ...AttributeValueConnection
  }
}
fragment VariableProduct on VariableProduct {
  ...Product
  attributeList {
    ...AttributeValueConnection
  }
  bindings {
    ...Attribute
    optionList(first: 10, after: "") {
      edges {
        node {
          code
          customFields {
            customField {
              code
            }
          }
          name(languages: ["en_US"]) {
            value
            language
          }
        }
      }
    }
  }
  variantList {
    ...ProductConnection
  }
}
fragment AttributeValueConnection on AttributeValueConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      attribute {
        ...Attribute
      }
      translations {
        language
      }
    }
  }
}
fragment Attribute on Attribute {
  code
  name(languages: ["en_US"]) {
    value
    language
  }
  scope
}
fragment Product on Product {
  __typename
  sku
  createdAt
  editedAt
}
fragment ProductConnection on ProductConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      ...Product
    }
  }
}PreviousGet information about specific product and specific attribute values in specific languageNextList of grouped products with simple and variable products AFTER some end cursor
Last updated
Was this helpful?

