digitalperception / catalog-graph-ql
此软件包最新版本(1.0.0)没有可用的许可信息。
此模块是magento-2.4的module-catalog-graph-ql模块的扩展。
1.0.0
2021-07-12 02:48 UTC
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
自定义属性文本值
Graphql产品查询仅返回选择或多选类型属性的选项值的id。此模块的实现将允许我们检索给定商店语言中给定产品的属性选项值的文本标签。
兼容性
v1.0.0 - versions 2.3.* - 2.4.*
变更列表
v1.0.0 - Start project
安装
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
使用方法
Graphql输入负载
{
products(filter: {sku: {eq: "24-MB03"}}) {
items {
id
sku
name
dynamicAttributes(fields: ["material","brand"]) {
code
label
value
}
}
}
}
输出响应
"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"
}
],