mageworx / module-faq-graphql
mageworx/module-faq-graphql
MageWorx_FaqGraphQl
GraphQL addon for the MageWorx_Faq module. Exposes FAQ data (blocks and Q&A items) via Magento GraphQL API for headless and Hyva storefronts.
Requirements
- Magento 2.4.x with
Magento_GraphQlmodule enabled MageWorx_Faqmodule installed and enabled
Installation
The module is installed as part of the MageWorx FAQ package. After placing files run:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
Queries
FAQ by Product
{
faqByProduct(product_id: 42) {
blocks {
block_id
title
description
type
sort_order
items {
item_id
question_id
answer_id
sort_order
question
answer
}
}
}
}
FAQ by Category
{
faqByCategory(category_id: 10) {
blocks {
title
items {
question_id
question
answer
}
}
}
}
FAQ by CMS Page
{
faqByCmsPage(page_id: 5) {
blocks {
title
items {
question
answer
}
}
}
}
FAQ by Block (direct)
{
faqByBlock(block_id: 3) {
blocks {
title
items {
question
answer
}
}
}
}
Store Configuration
Frontend display settings are available via storeConfig:
{
storeConfig {
mageworx_faq_enabled
mageworx_faq_accordion_mode
mageworx_faq_answers_default_state
mageworx_faq_open_first_question
mageworx_faq_show_block_titles
mageworx_faq_answers_spoiler_limit
}
}
Response Types
| Type | Fields |
|---|---|
FaqPage |
blocks: [FaqBlock!]! |
FaqBlock |
block_id, title, description, type, sort_order, items |
FaqItem |
item_id, question_id, answer_id, sort_order, question, answer |
Store Scope
All queries automatically resolve values for the store determined by the request's Store header, with fallback to default (store 0) values.
Caching
Responses are cached at the GraphQL layer using the @cache directive with FaqIdentity as the cache identity provider. Cache is invalidated when any FAQ block, question, or answer is modified in the admin panel — including per-store-view content changes.
Anchor Links (headless)
FaqItem.question_id is a stable database ID that does not change on reordering. Headless storefronts can use it to build deep links to specific FAQ questions:
https://example.com/product.html#faq-question-{question_id}
This matches the anchor link format used by the standard Luma/Hyva frontend rendering in MageWorx_Faq.
No changelog yet
The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.
Requires 4
| Package | Constraint |
|---|---|
| magento/framework | >=103 < 104 |
| magento/module-graph-ql | >=100.4 |
| magento/module-store-graph-ql | >=100.3 |
| mageworx/module-faq | >=1.0.0 |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | not tested | Fail dependency conflict | ||
| 2.4.8 | not tested | not tested | ||
| 2.4.9 | not tested | not tested |
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge — a phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases. Cell → details modal.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from mageworx
View vendorTurn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.