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(4mo ago)06682MITPHPPHP &gt;=8.1

Since Aug 4Pushed 4mo 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 1mo ago

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

40

—

FairBetter than 88% of packages

Maintenance74

Regular maintenance activity

Popularity19

Limited adoption so far

Community10

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

140d 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

8044.5M33](/packages/smile-elasticsuite)[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[zepgram/module-rest

Technical module to industrialize API REST call with dependency injection pattern using Guzzle library

1326.2k](/packages/zepgram-module-rest)[yireo/magento2-additional-endpoints-graph-ql

113.0k](/packages/yireo-magento2-additional-endpoints-graph-ql)

PHPackages © 2026

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