{"id":27387580,"url":"https://github.com/graycoreio/magento2-graphql-introspection-cache","last_synced_at":"2025-10-29T16:15:05.163Z","repository":{"id":47401984,"uuid":"516097851","full_name":"graycoreio/magento2-graphql-introspection-cache","owner":"graycoreio","description":"This package caches introspection results from the GraphQl native `__types` query.","archived":false,"fork":false,"pushed_at":"2025-02-25T17:07:05.000Z","size":67,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-25T17:35:37.564Z","etag":null,"topics":["caching","graphql","mage-os","magento2","performance"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graycoreio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-20T18:43:55.000Z","updated_at":"2025-02-25T17:07:08.000Z","dependencies_parsed_at":"2024-06-19T03:08:10.101Z","dependency_job_id":null,"html_url":"https://github.com/graycoreio/magento2-graphql-introspection-cache","commit_stats":{"total_commits":19,"total_committers":3,"mean_commits":6.333333333333333,"dds":0.631578947368421,"last_synced_commit":"31ada882c6513f37dd06a707ecc9186f407db1e4"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graycoreio%2Fmagento2-graphql-introspection-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graycoreio%2Fmagento2-graphql-introspection-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graycoreio%2Fmagento2-graphql-introspection-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graycoreio%2Fmagento2-graphql-introspection-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graycoreio","download_url":"https://codeload.github.com/graycoreio/magento2-graphql-introspection-cache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248758438,"owners_count":21156957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caching","graphql","mage-os","magento2","performance"],"created_at":"2025-04-13T18:02:28.470Z","updated_at":"2025-10-29T16:15:00.118Z","avatar_url":"https://github.com/graycoreio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magento 2 GraphQL Introspection Cache\n\n\u003cdiv align=\"center\"\u003e\n\n[![Packagist Downloads](https://img.shields.io/packagist/dm/graycore/magento2-graphql-introspection-cache?color=blue)](https://packagist.org/packages/graycore/magento2-graphql-introspection-cache/stats)\n[![Packagist Version](https://img.shields.io/packagist/v/graycore/magento2-graphql-introspection-cache?color=blue)](https://packagist.org/packages/graycore/magento2-graphql-introspection-cache)\n[![Packagist License](https://img.shields.io/packagist/l/graycore/magento2-graphql-introspection-cache)](https://github.com/graycoreio/magento2-graphql-introspection-cache/blob/main/LICENSE)\n[![Unit Test](https://github.com/graycoreio/magento2-graphql-introspection-cache/actions/workflows/unit.yaml/badge.svg)](https://github.com/graycoreio/magento2-graphql-introspection-cache/actions/workflows/unit.yaml)\n[![Integration Test](https://github.com/graycoreio/magento2-graphql-introspection-cache/actions/workflows/integration.yaml/badge.svg)](https://github.com/graycoreio/magento2-graphql-introspection-cache/actions/workflows/integration.yaml)\n\n\u003c/div\u003e\n\n\nThis module allows you to use the same mechanism that is used for caching regular GraphQL resolvers, for introspection queries.\n\nThis helps minimize the number of times Magento is bootstrapped.\n\nThe following introspection types are supported out of the box:\n\n- ProductAttributeFilterInput\n\nThis module is **experimental**, it contains BC-fixes for older Magento versions (\u003c2.4.2). Class internals will likely change when support for those versions end.\n\n## Getting Started\nThis module is intended to be installed with [composer](https://getcomposer.org/). From the root of your Magento 2 project:\n\n1. Download the package\n```bash\ncomposer require graycore/magento2-graphql-introspection-cache\n```\n2. Enable the package\n\n```bash\n./bin/magento module:enable Graycore_GraphQlIntrospectionCache\n```\n\n## Usage\n\nYou can add your own introspection cache identity by adding a bit of di.xml:\n\n```xml\n\u003ctype name=\"Graycore\\GraphQlIntrospectionCache\\Plugin\\CachePlugin\"\u003e\n    \u003carguments\u003e\n        \u003cargument xsi:type=\"array\" name=\"introspectionHandlers\"\u003e\n            \u003citem xsi:type=\"object\" name=\"NameOfInspectedType\"\u003eNamespace\\Module\\Model\\Cache\\Identity\\Introspection\\NameOfInspectedType\u003c/item\u003e\n        \u003c/argument\u003e\n    \u003c/arguments\u003e\n\u003c/type\u003e\n```\n\nYour class must implement `Magento\\Framework\\GraphQl\\Query\\Resolver\\IdentityInterface`.\n\nFor more information on GraphQL Cache Identities, please visit the [official documentation](https://devdocs.magento.com/guides/v2.4/graphql/develop/identity-class.html).\n\n## Internals\n\n- 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.\n- 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.\n\nCheck out the unit/integration tests to get a better picture.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraycoreio%2Fmagento2-graphql-introspection-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraycoreio%2Fmagento2-graphql-introspection-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraycoreio%2Fmagento2-graphql-introspection-cache/lists"}