Type
magento2-module
magento2-module
OSL-3.0
None
None
None
None
None
This module offers some additional endpoints for loading information through GraphQL.
Use the following commands to install this module into Magento 2:
composer require magento2-additional-endpoints-graph-ql:@dev
bin/magento module:enable Yireo_AdditionalEndpointsGraphQl
bin/magento setup:upgrade
productById(Int id)
- Get a product by its IDExample:
{
productById(id:42){
sku
name
}
}
productBySku(String! sku)
- Get a product by its SKUExample:
{
productBySku(sku:"VA22-SI-NA"){
sku
name
}
}
categoryById(Int id)
- Get a category by its IDExample:
{
categoryById(id:1){
id
name
}
}
cmsBlock(String! identifier)
- Get a CMS block by its identifierExample:
{
cmsBlock(identifier:"example"){
title
content
}
}
cmsPages
- Get all CMS pagesExample:
{
cmsPages {
items {
title
}
}
}
cmsWidget(Int! id)
- Get a CMS widget by its IDExample:
{
cmsWidget(id: "2") {
id
title
html
parameters {
name
value
}
}
}
validateCustomerToken
- Validate a customer tokenExample:
query validateToken {
validateCustomerToken(token:"abc")
}