yireo / magento2-byattribute-graph-ql
Show any listing of any product attribute in GraphQL
Installs: 372
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 0
Open Issues: 1
Type:magento2-module
Requires
- php: >=7.0.0
- laminas/laminas-db: *
- magento/framework: ^100.0|^101.0|^102.0|^103.0
- magento/module-catalog: ^101.0|^102.0|^103.0|^104.0
- magento/module-eav: ^100.0|^101.0|^102.0
- magento/module-graph-ql: ^100.3
Requires (Dev)
- composer/composer: *@dev
- phpunit/phpunit: *
Suggests
- yireo/magento2-byattribute2: *
This package is auto-updated.
Last update: 2024-10-22 01:15:38 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
ProductCounter
and split it up in smaller classes