Yireo_GraphQlSchemaManipulation
PHP
8.2 - 8.5
Magento
2.4.6 - 2.4.9
CSP
Yes
License
OSL-3.0
Latest Release
0.0.2
Magento 2 module to manipulate the GraphQL schema before it is being used. This can be useful when trying to remove endpoints that are added by monolithic extensions and perhaps other use-cases.
Installation
composer require yireo/magento2-graph-ql-schema-manipulation bin/magento module:enable Yireo_GraphQlSchemaManipulation
Usage
To manipulate the schema yourself, you will need to create a class similar to the following:
class ExampleSchemaManipulator implements \Yireo\GraphQlSchemaManipulation\Schema\ManipulationInterface { public function manipulateFieldsConfig(array $config): array { foreach ($config as $fieldIndex => $field) { if (in_array($fieldIndex, ['isEmailAvailable'])) { unset($config[$fieldIndex]); } } return $config; } }
Next, create a di.xml file that adds this class to this module:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Yireo\GraphQlSchemaManipulation\Plugin\AddSchemaManipulators"> <arguments> <argument name="schemaManipulators" xsi:type="array"> <item name="example" xsi:type="object">ExampleSchemaManipulator</item> </argument> </arguments> </type> </config>
Current status
Magento 2 Static Tests
success
Magento 2 DI compilation
success
Magento 2 Unit Tests
success
Magento 2 Integration Tests
success
Playwright test
success
Support
For getting support, create an Issue under the following project URL:
https://github.com/yireo/Yireo_GraphQlSchemaManipulation
Composer details
Magento module name
Yireo_GraphQlSchemaManipulationComposer name
yireo/magento2-graph-ql-schema-manipulationComposer version
No release yet
Default branch
master
Requirements
magento/framework: ^103.0
php: >=8.2 <8.6
Releases
| 0.0.2 | 06 November 2026 |
Changelog
Last modified: October 17, 2026