digitalperception / catalog-graph-ql
This module is an extension of module-catalog-graph-ql of magento-2.4
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- php: ~7.3.0||~7.4.0
- magento/framework: 103.0.*
- magento/module-catalog: 104.0.*
- magento/module-catalog-graph-ql: 100.4.*
- magento/module-catalog-inventory: 100.4.*
- magento/module-catalog-search: 102.0.*
- magento/module-directory: 100.4.*
- magento/module-eav: 102.1.*
- magento/module-eav-graph-ql: 100.4.*
- magento/module-graph-ql: 100.4.*
- magento/module-search: 101.1.*
- magento/module-store: 101.1.*
Suggests
- magento/module-graph-ql-cache: 100.4.*
- magento/module-store-graph-ql: 100.4.*
README
Custom_Attribute Text Values
Graphql products query returns only ids of option values for select or multiselect type attributes. Implementation of this module will allow us to retrieve Text Labels of option values of an attribute in a given store language for a given product.
Compatible
v1.0.0 - versions 2.3.* - 2.4.*
Change list
v1.0.0 - Start project
Installation
1. This module is intended to be installed using composer
[ composer require digitalperception/catalog-graph-ql ]
2. Run following commands from your root Magento installation directory:
bin/magento module:enable DigitalPerception_CatalogGraphQl
bin/magento setup:upgrade
bin/magento cache:flush
Usage
Graphql Input Payload
{
products(filter: {sku: {eq: "24-MB03"}}) {
items {
id
sku
name
dynamicAttributes(fields: ["material","brand"]) {
code
label
value
}
}
}
}
Output Response
"id": 3,
"sku": "24-MB03",
"name": "Crown Summit Backpack",
"custom_attributes": [
{
"code": "material",
"label": "Materialfr",
"value": "woolfr"
},
{
"code": "features_bags",
"label": "Features",
"value": "Audio Pocket, Waterproof, Lightweight, Reflective, Laptop Sleeve"
}
],