> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heychocolate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Products

> Query products with sustainability data, impact scores, and sector-specific metadata.

## product

Retrieve a single product by ID.

```graphql theme={null}
query {
  product(id: "prod_abc123") {
    id
    name
    sectorTag
    materialComposition {
      name
      percentage
      isBioBased
      recycledContent
    }
    impactScore {
      co2Equivalent
      mkiScore
      waterFootprint
      equivalencies {
        description
        value
        icon
      }
      breakdown {
        phase
        contribution
        percentage
      }
    }
    certifications
    sectorMetadata
  }
}
```

**Arguments:**

| Argument | Type | Required | Description        |
| -------- | ---- | -------- | ------------------ |
| `id`     | ID!  | Yes      | Product identifier |

## products

List products with filtering and sorting.

```graphql theme={null}
query {
  products(
    first: 20
    after: "cursor_abc"
    filter: {
      sectorTag: FOOD
      co2Range: { min: 0, max: 50 }
    }
    sort: { field: CO2_EQUIVALENT, direction: ASC }
  ) {
    totalCount
    edges {
      node {
        id
        name
        sectorTag
        impactScore {
          co2Equivalent
          mkiScore
        }
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

**Arguments:**

| Argument | Type          | Required | Description                               |
| -------- | ------------- | -------- | ----------------------------------------- |
| `first`  | Int           | No       | Results to return (default: 20, max: 100) |
| `after`  | String        | No       | Cursor for pagination                     |
| `filter` | ProductFilter | No       | Filter criteria                           |
| `sort`   | ProductSort   | No       | Sort order                                |

### ProductFilter

| Field            | Type       | Description                  |
| ---------------- | ---------- | ---------------------------- |
| `sectorTag`      | SectorTag  | Filter by sector             |
| `co2Range`       | RangeInput | CO2 equivalent range         |
| `mkiRange`       | RangeInput | MKI score range              |
| `certifications` | \[String!] | Required certifications      |
| `hasEpd`         | Boolean    | Has EPD data                 |
| `hasDpp`         | Boolean    | Has Digital Product Passport |

## productDetailPage

Optimized endpoint for front-end product detail pages with pre-calculated data and edge caching support.

```graphql theme={null}
query {
  productDetailPage(id: "prod_abc123", locale: "nl") {
    product {
      id
      name
      sectorTag
    }
    impactScore {
      co2Equivalent
      mkiScore
      equivalencies {
        description
        value
        icon
      }
    }
    comparison {
      averageInSector
      percentileBetter
      label
    }
    badges {
      name
      icon
      description
    }
    dppUrl
    visualisationParams {
      lottieTemplate
      parameters
    }
  }
}
```

<Info>
  The `productDetailPage` query is optimized for \<100ms response times. Results are edge-cached with a 1-hour TTL.
</Info>
