PHPackages                             justbetter/magento2-graphql-search-fallback - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. justbetter/magento2-graphql-search-fallback

ActiveMagento2-module[API Development](/categories/api)

justbetter/magento2-graphql-search-fallback
===========================================

Magento 2 module providing GraphQL product query fallback when search engine is disabled

1.0.2(6mo ago)09441MITPHPPHP &gt;=8.1

Since Aug 4Pushed 6mo agoCompare

[ Source](https://github.com/justbetter/magento2-graphql-search-fallback)[ Packagist](https://packagist.org/packages/justbetter/magento2-graphql-search-fallback)[ RSS](/packages/justbetter-magento2-graphql-search-fallback/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

Magento 2 GraphQL Search Fallback
=================================

[](#magento-2-graphql-search-fallback)

A simple and lightweight Magento 2 module that provides a fallback mechanism for GraphQL product queries when the search engine (Elasticsearch/OpenSearch) is disabled.

Why this module was created
---------------------------

[](#why-this-module-was-created)

We initially used the `zepgram/module-disable-search-engine` module to disable the search engine, but quickly discovered that product reviews were no longer available via GraphQL. This revealed that the search engine was still required for product queries in GraphQL. This module solves that problem by providing a fallback mechanism, ensuring that product queries (including reviews) continue to work even when the search engine is disabled.

Features
--------

[](#features)

- **Complete search engine bypass**: Directly uses Magento product collections instead of search engine
- **Filter support**: Works with all standard GraphQL product filters (SKU, name, price, categories, etc.)
- **Zero configuration**: Works out of the box after installation

Installation
------------

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require justbetter/magento2-graphql-search-fallback
php bin/magento module:enable JustBetter_GraphqlSearchFallback
php bin/magento setup:upgrade
php bin/magento cache:flush
```

Usage
-----

[](#usage)

The module works automatically once installed. It intercepts all GraphQL `products` queries and provides results using direct database queries instead of the search engine.

### Supported GraphQL Filters

[](#supported-graphql-filters)

- `sku: {eq: "product-sku"}`
- `name: {match: "product name"}`
- `price: {from: 10, to: 100}`
- `category_id: {eq: "123"}`
- `category_uid: {eq: "encoded-category-uid"}`
- Any custom product attribute with operators: `eq`, `in`, `match`, `from`, `to`

Technical Details
-----------------

[](#technical-details)

### How It Works

[](#how-it-works)

1. **Plugin Interception**: Uses `aroundResolve` plugin on `Magento\CatalogGraphQl\Model\Resolver\Products`
2. **Direct Collection**: Creates product collection directly via `CollectionFactory`
3. **Filter Mapping**: Maps GraphQL filter operators to Magento collection filters
4. **Standard Response**: Returns the same response format as the original resolver

Requirements
------------

[](#requirements)

- Magento 2.4.8 or higher
- PHP 8.1 or higher

Support
-------

[](#support)

This module is developed and maintained by [JustBetter](https://justbetter.nl).

License
-------

[](#license)

[MIT License](LICENSE)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance67

Regular maintenance activity

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~70 days

Total

3

Last Release

193d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d00b3f55cd4ae8b8cfb001a644ed6c7a1127a956c24375bcfe16ce12bd89bed?d=identicon)[justbetter](/maintainers/justbetter)

---

Top Contributors

[![claudio-ferraro](https://avatars.githubusercontent.com/u/54107647?v=4)](https://github.com/claudio-ferraro "claudio-ferraro (4 commits)")[![Jade-GG](https://avatars.githubusercontent.com/u/32514269?v=4)](https://github.com/Jade-GG "Jade-GG (1 commits)")

### Embed Badge

![Health badge](/badges/justbetter-magento2-graphql-search-fallback/health.svg)

```
[![Health](https://phpackages.com/badges/justbetter-magento2-graphql-search-fallback/health.svg)](https://phpackages.com/packages/justbetter-magento2-graphql-search-fallback)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8064.7M49](/packages/smile-elasticsuite)[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[magento/module-upward-connector

Magento module used for routing all frontend requests through UPWARD-PHP.

24434.4k1](/packages/magento-module-upward-connector)[elgentos/module-prismicio

Magento 2 - Prismic.io integration

39119.0k4](/packages/elgentos-module-prismicio)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

3017.9k](/packages/mage-os-module-automatic-translation)[opengento/module-category-import-export

This module add the capability to import and export the categories from the back-office.

1310.9k2](/packages/opengento-module-category-import-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
