# List of grouped products with simple and variable products AFTER some end cursor

{% hint style="info" %}
This approach can be helpful if you do not use the "first" argument or records in a stream that exceeded 200.
{% endhint %}

{% hint style="info" %}
Please take note that the cursor is a string, therefore needs to be put in quotes.
{% endhint %}

{% hint style="info" %}
To understand what streams and cursors are, please refer to the "Query types" article in the "Overview" section on this page.
{% endhint %}

```graphql
query groupingProduct {
  productStream(after: "YXJyYXljb25uZWN0aW9uOjM2MTE=") {
    ...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) {
      edges {
        node {
          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
    }
  }
}
```

{% hint style="info" %}
It's also possible to use both "after" and "first" arguments in one query. Example below will return 100 records (if they exist), that are after endCursor in productStream.
{% endhint %}

```graphql
query groupingProduct {
  productStream(after: "YXJyYXljb25uZWN0aW9uOjM2MTE=", 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
    options {
      code
      name {
        value
        language
      }
    }
  }
  variantList {
    ... ProductConnection
  }
}

fragment AttributeValueConnection on AttributeValueConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      attribute {
        ... Attribute
      }
      translations {
        language
      }
    }
  }
}

fragment Attribute on Attribute {
  code
  name {
    value
    language
  }
  scope
}

fragment Product on Product {
  __typename
  sku
  createdAt
  editedAt
}

fragment ProductConnection on ProductConnection {
  pageInfo {
    hasNextPage
    endCursor
  }
  edges {
    node {
      ... Product
    }
  }
}
```
