-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Labels
Description
attributes
query allows the user to apply inCategory
and inCollection
filters. This pattern can be used to create dynamic filters for product listings (show attribute filters relevant to the given category).
query AttributesForCategory{
attributes(filter: {inCategory:"Q2F0ZWdvcnk6MjU="}, first:10, channel: "default-channel"){
edges{
node{
name
inputType
choices(first:10){
edges{
node{
name
}
}
}
}
}
}
}
{
"data": {
"attributes": {
"edges": [
{
"node": {
"name": "Medium",
"inputType": "DROPDOWN",
"choices": {
"edges": [
{
"node": {
"name": "Vinyl"
}
},
{
"node": {
"name": "DVD"
}
},
{
"node": {
"name": "VHS"
}
},
{
"node": {
"name": "iTunes"
}
},
{
"node": {
"name": "CD"
}
},
{
"node": {
"name": "MP3"
}
}
]
}
}
},
...
### Tasks
- [ ] Add examples for `inCategory` filter in the Attribute guide
- [ ] Add link to this guide in the products section