yireo / magento2-byattribute-graph-ql
Show any listing of any product attribute in GraphQL
Package info
github.com/yireo/Yireo_ByAttributeGraphQl
Type:magento2-module
pkg:composer/yireo/magento2-byattribute-graph-ql
1.0.0
2026-11-25 18:45 UTC
Requires
- php: >=8.2 <8.6
- ext-pcre: *
- magento/framework: ^103.0.6
- magento/module-catalog: ^104.0.6
- magento/module-catalog-inventory: ^100.4.6
- magento/module-eav: ^102.1.6
- magento/module-graph-ql: ^100.4.6
- magento/module-store: ^101.1.6
Requires (Dev)
- ext-json: *
- phpunit/phpunit: ^9.5|^10.0|^11.0|^12.0
- yireo/magento2-integration-test-helper: ~0.0
Suggests
- yireo/magento2-byattribute2: *
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-25 18:56:44 UTC
README
This Magento 2 extension adds a GraphQL endpoint for accessing product attributes via GraphQL. This requires at least Magento 2.3 or higher.
To install this module, run:
composer require yireo/magento2-byattribute-graph-ql
./bin/magento module:enable Yireo_ByAttributeGraphQl
Sample GraphQL queries
Here are some sample GraphQL queries to show the usage of this extension:
{
productAttribute(code:"material") {
id
code
label
default_value
options {
value
label
product_count
}
}
}
Or if you want to return less information (and include a category filter):
{
productAttribute(code:"color", category_id: 42) {
id
options {
value
}
}
}
TODO
- Cache vital parts of product count
- Refactor
ProductCounterand split it up in smaller classes