The Home for
Magento Excellence

Explore. Discover. Elevate. #magento

162
Modules Tested
99
Ready for Magento 2.4
63
Need Your Help
Stable vv0.2.0

Magento 2 GraphQL Introspection Cache

graycore/magento2-graphql-introspection-cache

This module allows you to use the same mechanism that is used for caching regular GraphQL resolvers, for introspection queries. This helps minimize the number of times Magento is bootstrapped.

14,511
Downloads
Below average
10
GitHub Stars
Below average
10mo ago
Last Release
1
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
L5 PHPStan

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

vv0.2.0 on Magento 2.4.8-p3
Dec 15, 2025
vv0.2.0 on Magento 2.4.8-p2
Aug 14, 2025
vv0.2.0 on Magento 2.4.8
May 18, 2025
vv0.2.0 on Magento 2.4.7-p4
Mar 8, 2025
vv0.1.2 on Magento 2.4.7-p4
Feb 15, 2025
vv0.1.2 on Magento 2.4.7-p3
Oct 15, 2024

+7 older tests

GitHub Repository
Source code & docs
Packagist
Version history
Issues & Support
Get help or report bugs

Share This Module's Status

Magento 2 GraphQL Introspection Cache Magento compatibility status badge

README

Loaded from GitHub

Magento 2 GraphQL Introspection Cache

Packagist Downloads Packagist Version Packagist License Unit Test Integration Test

This module allows you to use the same mechanism that is used for caching regular GraphQL resolvers, for introspection queries.

This helps minimize the number of times Magento is bootstrapped.

The following introspection types are supported out of the box:

  • ProductAttributeFilterInput

This module is experimental, it contains BC-fixes for older Magento versions (<2.4.2). Class internals will likely change when support for those versions end.

Getting Started

This module is intended to be installed with composer. From the root of your Magento 2 project:

  1. Download the package
composer require graycore/magento2-graphql-introspection-cache
  1. Enable the package
./bin/magento module:enable Graycore_GraphQlIntrospectionCache

Usage

You can add your own introspection cache identity by adding a bit of di.xml:

<type name="Graycore\GraphQlIntrospectionCache\Plugin\CachePlugin">
    <arguments>
        <argument xsi:type="array" name="introspectionHandlers">
            <item xsi:type="object" name="NameOfInspectedType">Namespace\Module\Model\Cache\Identity\Introspection\NameOfInspectedType</item>
        </argument>
    </arguments>
</type>

Your class must implement Magento\Framework\GraphQl\Query\Resolver\IdentityInterface.

For more information on GraphQL Cache Identities, please visit the official documentation.

Internals

  • A before plugin is created on QueryProcessor::process to set a custom ReferenceExecutor. This ReferenceExecutor is instantiated using the Object Manager, so that we can use plugins on it in a later stage.
  • An after plugin is created on ReferenceExecutor::doExecute. This plugin determines if we are dealing with an introspection request and if there is a cache identity registered for it. If there is, it will attempt to generate cache tags and add it to the request.

Check out the unit/integration tests to get a better picture.

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.

Back to All Modules