inpost / magento2-module-restrictions-graph-ql
Module implements GraphQL fields and queries for InPost_Restrictions module.
Package info
github.com/FastWhiteCat/magento2-module-restrictions-graph-ql
Type:magento2-module
pkg:composer/inpost/magento2-module-restrictions-graph-ql
Requires
- php: >=8.1
- inpost/magento2-module-restrictions: ^3.1.0
- magento/framework: ^103.0.6
- magento/module-catalog: ^104.0.6
- magento/module-catalog-graph-ql: ^100.4.6
- magento/module-graph-ql: ^100.4.6
- magento/module-store: ^101.1.6
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-12-01 11:08:46 UTC
README
Module adds GraphQL fields and queries for the InPost_Restrictions module, so PWA storefronts can hide the InPost Pay widget on the product page in the same way as Luma does.
License
- This plugin is licensed under the Creative Commons BY-NC-ND 4.0 License.
- You are free to use this plugin in its original, unmodified form for non-commercial purposes only.
- Redistribution, modification, and commercial use are strictly prohibited.
- License details: http://creativecommons.org/licenses/by-nc-nd/4.0/
Compatibility
- Magento Community 2.4.6
- Not tested in other versions
Installation
To enable this extension run following commands:
bin/magento module:enable InPost_RestrictionsGraphQlbin/magento setup:upgradebin/magento setup:di:compile(production mode)
Product restrictions (inpost_pay_product_restrictions)
true means the product cannot be bought via InPost Pay on the current website: no InPost delivery method is
allowed for it by the restriction rules (a rule for both delivery methods, or an APM rule and a Courier rule on the
same website). Hide the InPost Pay widget on the product page when the value is true.
A product restricted only for APM (or only for Courier) returns false: the widget stays visible and InPost Pay
offers only the allowed delivery method.
For configurable products pass the product shown on the product page (the parent), as Luma does.
Field on ProductInterface, e.g. on the product page products query:
{
products(filter: { sku: { eq: "24-MB01" } }) {
items {
sku
inpost_pay_product_restrictions
}
}
}
Standalone query by SKU:
{
inPostPayProductRestrictions(sku: "24-MB01") {
inpost_pay_product_restrictions
}
}
The query returns a "Product with SKU ... not found." error for an unknown SKU, a disabled product and a product that is not assigned to the current website.
Both are cached with the product cache tag, which is cleaned when refreshed restriction rules change the product.
Cart, minicart and checkout: the widget there is not hidden based on restrictions. Display is controlled only by the
StoreConfigflags (inpost_pay_show_on_cart,inpost_pay_show_in_minicart, ...), as on Luma.