---
updatedAt: 2026-08-18T18:39:20.000Z
agentTools:
  projectIndex: https://stockpit.readme.io/llms.txt
---

# Queries

Attributes are custom characteristics (e.g. Color, Size) used to classify products and their variants.

# Available queries

### `Attribute` - Returns a single attribute based on the `id` provided

```graphql
query {
  Attribute (id: 100012) {
    id
    label
    option {
      id
      label
    }
  }
}
```

### `Attributes` - Returns a list of attributes based on the filter define

```graphql
query {
  attributes {
    data {
    	id
    	label
    }
  }
}
```

<br/>

***

# Available fields

| id <span style={{ fontWeight: "normal" }}>- [Int](/reference/data-types#int) </span> |
| :----------------------------------------------------------------------------------- |
| Unique identifier of the attribute                                                   |

| label <span style={{ fontWeight: "normal" }}>- [String](/reference/data-types#string)</span> |
| :------------------------------------------------------------------------------------------- |
| Name of the attribute (ex: Red, Blue, XL, M)                                                 |

| option <span style={{ fontWeight: "normal" }}>- [Option](/reference/option-queries) - Subquery</span> |
| :---------------------------------------------------------------------------------------------------- |
| Option of the attribute                                                                               |

<br/>

***

# Filters

You can create filters based on following fields

| label                                                                  |
| :--------------------------------------------------------------------- |
| Example: `{ "column" : "LABEL", "operator" : "EQ", "value" : "blue" }` |

| option\_id                                                                  |
| :-------------------------------------------------------------------------- |
| Example: `{ "column" : "OPTION\_ID", "operator" : "EQ", "value" : 199876 }` |

***

# Sorting

You can sort data based on following fields : id, label