PHPackages                             dr-schopalopp/graphiql-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. [API Development](/categories/api)
4. /
5. dr-schopalopp/graphiql-middleware

ActiveLibrary[API Development](/categories/api)

dr-schopalopp/graphiql-middleware
=================================

GraphiQL PSR-15 Middleware based on https://github.com/graphql/graphiql

v0.2.0(5y ago)014[1 issues](https://github.com/dr-schopalopp/graphiql-middleware/issues)MITHTMLPHP ^7.4

Since Mar 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dr-schopalopp/graphiql-middleware)[ Packagist](https://packagist.org/packages/dr-schopalopp/graphiql-middleware)[ Docs](https://github.com/dr-schopalopp/graphiql-middleware)[ RSS](/packages/dr-schopalopp-graphiql-middleware/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (4)Used By (0)

GraphiQL PSR-15 Middleware
==========================

[](#graphiql-psr-15-middleware)

[![Latest Version](https://camo.githubusercontent.com/342ccda4eb6f8dfa32a6817b93f1400dee5e7c88d0cfea78c6bd6179ba3a453f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64722d7363686f70616c6f70702f677261706869716c2d6d6964646c65776172652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dr-schopalopp/graphiql-middleware)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Add a [GraphiQL](https://github.com/graphql/graphiql) interface to your application with this PSR-15 middleware.

This is basically a copy of [graphiql-middleware](https://github.com/rromanovsky/graphiql-middleware) adjusted for PSR-15.

[![](image/screenshot.png)](https://graphql.org/swapi-graphql)

Install
-------

[](#install)

```
composer require dr-schopalopp/graphiql-middleware
```

Usage
-----

[](#usage)

This middleware was developed in a slim project, but it should work with any other PSR-15 compatible framework.

### Slim 4

[](#slim-4)

```
// app/dependencies.php

use DrSchopalopp\GraphiQLMiddleware\GraphiQLMiddleware;

return function (ContainerBuilder $containerBuilder) {
    $containerBuilder->addDefinitions([
        // ...

        GraphiQLMiddleware::class => function () {
            return new GraphiQLMiddleware();
        }

        // ...
    ]);
};
```

```
// app/middleware.php

use DrSchopalopp\GraphiQLMiddleware\GraphiQLMiddleware;

return function (App $app) {
    // ...

    $app->add(GraphiQLMiddleware::class);

    // ...
};
```

```
// app/routes.php

return static function (App $app) {
    // ...

    // dummy route necessary otherwise you will get an HTTP 405 Method Not Allowed error
    $app->get('/graphiql', function (Request $request, Response $response) {
        return $response;
    });

    // ...
};
```

see [HTTP 405 Method Not Allowed](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405) for details

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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 ~0 days

Total

3

Last Release

1944d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/67077036?v=4)[Zeller](/maintainers/dr-schopalopp)[@dr-schopalopp](https://github.com/dr-schopalopp)

---

Top Contributors

[![dr-schopalopp](https://avatars.githubusercontent.com/u/67077036?v=4)](https://github.com/dr-schopalopp "dr-schopalopp (4 commits)")

---

Tags

graphiqlgraphqlmiddlewarepsr-15slimslim-4slim-frameworkslimphppsrgraphqlpsr-15graphiql

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dr-schopalopp-graphiql-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/dr-schopalopp-graphiql-middleware/health.svg)](https://phpackages.com/packages/dr-schopalopp-graphiql-middleware)
```

###  Alternatives

[mezzio/mezzio

PSR-15 Middleware Microframework

3923.8M126](/packages/mezzio-mezzio)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5733.3M47](/packages/thecodingmachine-graphqlite)[overblog/graphiql-bundle

Symfony GraphiQLBundle makes possible to render the UI into your symfony project

776.2M30](/packages/overblog-graphiql-bundle)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

633.8M13](/packages/mll-lab-laravel-graphiql)[pagemachine/searchable

TYPO3 extension to index and search content with Elasticsearch

1039.9k](/packages/pagemachine-searchable)[phps-cans/psr7-middleware-graphql

This package contains a http-interop middleware implementation to handle graphql request

1529.0k](/packages/phps-cans-psr7-middleware-graphql)

PHPackages © 2026

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