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
Example:
{
productById(id:42){
sku
name
}
}
Example:
{
productBySku(sku:"VA22-SI-NA"){
sku
name
}
}
Example:
{
categoryById(id:1){
id
name
}
}
Example:
{
cmsBlock(identifier:"example"){
title
content
}
}
Example:
{
cmsPages {
items {
title
}
}
}
Example:
{
cmsWidget(id: "2") {
id
title
html
parameters {
name
value
}
}
}
Example:
query validateToken {
validateCustomerToken(token:"abc")
}