PWA Studio only. Learn more.

PWA implementations and attributes

Interfaces

AttributeOptionsInterface

Attribute Data Type Description
attribute_options [AttributeOptionInterface] An array of attribute options

SelectableInputTypeInterface

Attribute Data Type Description
attribute_options [AttributeOptionInterface] An array of attribute options

UiInputTypeInterface

Attribute Data Type Description
is_html_allowed Boolean Indicates whether the attribute value is allowed to have html content
ui_input_type UiInputTypeEnum The frontend input type of the attribute

Types

CustomAttribute

Attribute Data Type Description
attribute_metadata AttributeMetadataInterface Attribute metadata details
entered_attribute_value EnteredAttributeValue Attribute value represented as entered data using input type like text field
selected_attribute_options SelectedAttributeOption Attribute value represented as selected options using input type like select

EnteredAttributeValue

Attribute Data Type Description
value String Attribute value

ProductAttributeMetadata

ProductAttributeMetadata implements AttributeMetadataInterface.

Attribute Data Type Description
used_in_components [CustomAttributesListsEnum!] Places in the store front where the attribute is used

Example usage

Request:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
products(filter: { sku: { eq: "VA08" } }) {
    items {
      name
      sku
      custom_attributes {
        attribute_metadata {
          ... on ProductAttributeMetadata {
            label
            code
            data_type
            ... on AttributeMetadataInterface {
              attribute_labels {
                label
              }
            }
          }
          ui_input {
            ui_input_type
            ... on SelectableInputTypeInterface {
              attribute_options {
                label
                ... on AttributeOption {
                  value
                }
              }
            }
          }
        }
      }
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
{
  "data": {
    "products": {
      "items": [
        {
          "name": "Thick Leather Braided Belt",
          "sku": "VA08",
          "custom_attributes": [
            {
              "attribute_metadata": {
                "label": "Fashion Color",
                "code": "fashion_color",
                "data_type": "INT",
                "attribute_labels": [
                  {
                    "label": "Fashion Color"
                  }
                ],
                "ui_input": {
                  "ui_input_type": "SELECT",
                  "attribute_options": [
                    {
                      "label": "Gold",
                      "value": "40"
                    },
                    {
                      "label": "Peach",
                      "value": "61"
                    },
                    {
                      "label": "Khaki",
                      "value": "64"
                    },
                    {
                      "label": "Silver",
                      "value": "43"
                    },
                    {
                      "label": "Lilac",
                      "value": "67"
                    },
                    {
                      "label": "Rain",
                      "value": "70"
                    },
                    {
                      "label": "Mint",
                      "value": "73"
                    },
                    {
                      "label": "Lily",
                      "value": "76"
                    },
                    {
                      "label": "Latte",
                      "value": "79"
                    },
                    {
                      "label": "Cocoa",
                      "value": "82"
                    }
                  ]
                }
              }
            },
            {
              "attribute_metadata": {
                "label": "Fashion Material",
                "code": "fashion_material",
                "data_type": "STRING",
                "attribute_labels": [
                  {
                    "label": "Fashion Material"
                  }
                ],
                "ui_input": {
                  "ui_input_type": "MULTISELECT",
                  "attribute_options": [
                    {
                      "label": "14K Gold",
                      "value": "46"
                    },
                    {
                      "label": "Acrylic",
                      "value": "118"
                    },
                    {
                      "label": "Cashmere",
                      "value": "121"
                    },
                    {
                      "label": "Sterling Silver",
                      "value": "49"
                    },
                    {
                      "label": "Cotton",
                      "value": "124"
                    },
                    {
                      "label": "Linen",
                      "value": "127"
                    },
                    {
                      "label": "Leather",
                      "value": "130"
                    },
                    {
                      "label": "Nylon",
                      "value": "133"
                    },
                    {
                      "label": "Organic Cotton",
                      "value": "136"
                    },
                    {
                      "label": "Polyester",
                      "value": "139"
                    },
                    {
                      "label": "Rayon",
                      "value": "142"
                    },
                    {
                      "label": "Silk",
                      "value": "145"
                    },
                    {
                      "label": "Spandex",
                      "value": "148"
                    },
                    {
                      "label": "Viscose",
                      "value": "151"
                    },
                    {
                      "label": "Wool",
                      "value": "154"
                    }
                  ]
                }
              }
            },
            {
              "attribute_metadata": {
                "label": "Fashion Size",
                "code": "fashion_size",
                "data_type": "INT",
                "attribute_labels": [
                  {
                    "label": "Fashion Size"
                  }
                ],
                "ui_input": {
                  "ui_input_type": "SELECT",
                  "attribute_options": [
                    {
                      "label": "10",
                      "value": "109"
                    },
                    {
                      "label": "12",
                      "value": "112"
                    },
                    {
                      "label": "2",
                      "value": "97"
                    },
                    {
                      "label": "4",
                      "value": "100"
                    },
                    {
                      "label": "6",
                      "value": "103"
                    },
                    {
                      "label": "8",
                      "value": "106"
                    },
                    {
                      "label": "L",
                      "value": "85"
                    },
                    {
                      "label": "M",
                      "value": "88"
                    },
                    {
                      "label": "S",
                      "value": "91"
                    },
                    {
                      "label": "XS",
                      "value": "94"
                    }
                  ]
                }
              }
            },
            {
              "attribute_metadata": {
                "label": "Has Video",
                "code": "has_video",
                "data_type": "INT",
                "attribute_labels": [],
                "ui_input": {
                  "ui_input_type": "BOOLEAN",
                  "attribute_options": [
                    {
                      "label": "Yes",
                      "value": "1"
                    },
                    {
                      "label": "No",
                      "value": "0"
                    }
                  ]
                }
              }
            }
          ]
        }
      ]
    }
  }
}

SelectedAttributeOption

Attribute Data Type Description
attribute_option [AttributeOptionInterface!] Selected attribute option details

StoreLabels

Attribute Data Type Description
label String The label assigned to the attribute
store_code String The assigned store code
Type Implements
AttributeOption AttributeOptionInterface
AttributeOptions AttributeOptionsInterface
UiAttributeTypeAny UiInputTypeInterface
UiAttributeTypeBoolean UiInputTypeInterface, AttributeOptionsInterface, SelectableInputTypeInterface
UiAttributeTypeFixedProductTax UiInputTypeInterface
UiAttributeTypeMultiSelect UiInputTypeInterface, AttributeOptionsInterface, SelectableInputTypeInterface
UiAttributeTypePageBuilder UiInputTypeInterface
UiAttributeTypeSelect UiInputTypeInterface, AttributeOptionsInterface, SelectableInputTypeInterface
UiAttributeTypeTextarea UiInputTypeInterface
UiAttributeTypeTextEditor UiInputTypeInterface