PHPackages                             zestic/webonxy-middleware - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. zestic/webonxy-middleware

ActiveLibrary[HTTP &amp; Networking](/categories/http)

zestic/webonxy-middleware
=========================

Webonxy GraqhQL middleware

v1.2.1(2mo ago)073↓100%11MITPHPPHP ^8.3 || ^8.4CI failing

Since Aug 15Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/zestic/webonxy-middleware)[ Packagist](https://packagist.org/packages/zestic/webonxy-middleware)[ RSS](/packages/zestic-webonxy-middleware/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (15)Used By (1)

Webonxy GraphQL Middleware
==========================

[](#webonxy-graphql-middleware)

To use the middleware in Laminas Mezzio, configure the factories

in `config/autoload/dependencies.global.php`

```
return [
    'dependencies' => [
        'factories'  => [
            \GraphQL\Server\StandardServer::class => \Xaddax\GraphQL\Factory\StandardServerFactory::class,
            \Zestic\GraphQL\Middleware\GraphQLMiddleware::class => \Xaddax\GraphQL\Factory\GraphQLMiddlewareFactory::class,
        ],
    ],
];
```

Add configuration in `config/autoload/graphql.global.php`

```
return [
    'graphQL' => [
        'middleware' => [
            'allowedHeaders' => [
                'application/graphql',
                'application/json',
            ],
        ],
        'schema' => \Path\To\Schema::class, // optional, defaults to webonxy Schema
        'schemaConfig' => [], // optional, if not configured expected in Schema class constructor
        'server' => \Path\To\Server::class, // not yet implemented, defaults to webonxy StandardServer
        'serverConfig' => [
            'context' => \Zestic\GraphQL\Context\TokenContext::class
            'schema' => \Path\To\Your\Schema::class,
        ],
    ],
];
```

see the [WebOnyx Server Configuration Documentation](https://webonyx.github.io/graphql-php/executing-queries/#server-configuration-options) for the full options for the server config.

You'll need to set up the route. In `config/routes.php`

```
return function (Application $app, MiddlewareFactory $factory, ContainerInterface $container) : void {
    $app->post('/graphql', \Zestic\GraphQL\Middleware\GraphQLMiddleware::class, 'graphql');
};
```

Schema Definition Language
--------------------------

[](#schema-definition-language)

You can also use a Schema Definition Language as discussed [in the WebOnxy documentation](https://webonyx.github.io/graphql-php/schema-definition-language/).

In `config/autoload/graphql.global.php` change the schema in the `serverConfig` to `generatedSchema`

```
return [
    'graphQL' => [
        'serverConfig' => [
            'schema' => 'generatedSchema',
        ],
    ],
];
```

Then inside of the `graphQL` config add the `generatedSchema` configuration

```
return [
    'graphQL' => [
        'generatedSchema' => [
            'parserOptions' => [
                'experimentalFragmentVariables' => true, // to parse fragments
                'noLocation' => false, // default, set true for development
            ],
            'cache' => [
                'alwaysEnabled' => false, // default, set to true to cache when the system cache is not enabled
                'directoryChangeFilename' => 'directory-change-cache.php', // default
                'schemaCacheFilename' => 'schema-cache.php', // default
            ],
            'schemaDirectories' => [
                '/full/path/to/schema-directory-1',
                '/full/path/to/schema-directory-2',
            ],
        ],
    ],
];
```

See [the documentation](https://webonyx.github.io/graphql-php/class-reference/#graphqllanguageparser) for `parserOptions`

The cached data is stored in `data/cache/graphql`.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance86

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% 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 ~212 days

Recently: every ~119 days

Total

14

Last Release

73d ago

Major Versions

v0.9.1 → v1.0.02024-07-24

PHP version history (6 changes)v0.1PHP &gt;=7.1

v0.5.0PHP &gt;=7.1 || ^8.0

v0.7.0PHP ^8.0

v1.0.0PHP ^8.2

v1.1.1PHP ^8.3

v1.2.0PHP ^8.3 || ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd5a2c6deedf2f52379d21fa55c9f5c6d0999b0ac1ca2ca2f33293e229107bfe?d=identicon)[iampersistent](/maintainers/iampersistent)

---

Top Contributors

[![iampersistent](https://avatars.githubusercontent.com/u/16964?v=4)](https://github.com/iampersistent "iampersistent (3 commits)")

---

Tags

psr-7laminasgraphqlpsr-15webonxy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zestic-webonxy-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/zestic-webonxy-middleware/health.svg)](https://phpackages.com/packages/zestic-webonxy-middleware)
```

###  Alternatives

[mezzio/mezzio

PSR-15 Middleware Microframework

3883.6M97](/packages/mezzio-mezzio)[mezzio/mezzio-authentication

Authentication middleware for Mezzio and PSR-7 applications

121.6M26](/packages/mezzio-mezzio-authentication)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

586.6M81](/packages/laminas-laminas-stratigility)[mezzio/mezzio-swoole

Swoole support for Mezzio

92238.9k3](/packages/mezzio-mezzio-swoole)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)[laminas/laminas-mvc-middleware

Dispatch middleware pipelines in place of controllers in laminas-mvc.

22659.3k9](/packages/laminas-laminas-mvc-middleware)

PHPackages © 2026

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