@@ -31,40 +31,23 @@ The following query returns the attribute type for various custom and EAV attrib
31
31
32
32
{% highlight json %}
33
33
{
34
- customAttributeMetadata(attributes:
35
- [
36
- {
37
- attribute_code: "available_sort_by",
38
- entity_type: "catalog_category"
39
- },
40
- {
41
- attribute_code: "quantity_and_stock_status",
42
- entity_type: "catalog_product"
43
- },
44
- {
45
- attribute_code: "default_billing",
46
- entity_type: "customer"
47
- },
48
- {
49
- attribute_code: "region"
50
- entity_type: "customer_address"
51
- },
52
- {
53
- attribute_code: "media_gallery",
54
- entity_type: "catalog_product"
55
- }
56
- ]
57
- )
58
- {
59
- items
60
- {
61
- attribute_code
62
- entity_type
63
- attribute_type
64
- attribute_options
65
- }
66
- }
34
+ customAttributeMetadata(
35
+ attributes: {
36
+ attribute_code: "color"
37
+ entity_type: "4"
38
+ }
39
+ ) {
40
+ items {
41
+ attribute_code
42
+ entity_type
43
+ attribute_type
44
+ attribute_options {
45
+ value
46
+ label
47
+ }
48
+ }
67
49
}
50
+ }
68
51
{% endhighlight %}
69
52
70
53
** Response**
@@ -75,29 +58,71 @@ The following query returns the attribute type for various custom and EAV attrib
75
58
"customAttributeMetadata": {
76
59
"items": [
77
60
{
78
- "attribute_code": "available_sort_by",
79
- "entity_type": "catalog_category",
80
- "attribute_type": "EavDataAttributeOptionInterface"
81
- },
82
- {
83
- "attribute_code": "quantity_and_stock_status",
84
- "entity_type": "catalog_product",
85
- "attribute_type": "CatalogInventoryDataStockItemInterface[ ] "
86
- },
87
- {
88
- "attribute_code": "default_billing",
89
- "entity_type": "customer",
90
- "attribute_type": "CustomerDataAddressInterface"
91
- },
92
- {
93
- "attribute_code": "region",
94
- "entity_type": "customer_address",
95
- "attribute_type": "CustomerDataRegionInterface"
96
- },
97
- {
98
- "attribute_code": "media_gallery",
99
- "entity_type": "catalog_product",
100
- "attribute_type": "ProductMediaGallery"
61
+ "attribute_code": "color",
62
+ "entity_type": "4",
63
+ "attribute_type": "Int",
64
+ "attribute_options": [
65
+ {
66
+ "value": "49",
67
+ "label": "Black"
68
+ },
69
+ {
70
+ "value": "214",
71
+ "label": "blue"
72
+ },
73
+ {
74
+ "value": "215",
75
+ "label": "green"
76
+ },
77
+ {
78
+ "value": "213",
79
+ "label": "red"
80
+ },
81
+ {
82
+ "value": "50",
83
+ "label": "Blue"
84
+ },
85
+ {
86
+ "value": "51",
87
+ "label": "Brown"
88
+ },
89
+ {
90
+ "value": "52",
91
+ "label": "Gray"
92
+ },
93
+ {
94
+ "value": "53",
95
+ "label": "Green"
96
+ },
97
+ {
98
+ "value": "54",
99
+ "label": "Lavender"
100
+ },
101
+ {
102
+ "value": "55",
103
+ "label": "Multi"
104
+ },
105
+ {
106
+ "value": "56",
107
+ "label": "Orange"
108
+ },
109
+ {
110
+ "value": "57",
111
+ "label": "Purple"
112
+ },
113
+ {
114
+ "value": "58",
115
+ "label": "Red"
116
+ },
117
+ {
118
+ "value": "59",
119
+ "label": "White"
120
+ },
121
+ {
122
+ "value": "60",
123
+ "label": "Yellow"
124
+ }
125
+ ]
101
126
}
102
127
]
103
128
}
0 commit comments