# graphql-playground-middleware-express

> GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).

Latest version **1.7.23** (published 2021-11-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install graphql-playground-middleware-express
pnpm add graphql-playground-middleware-express
yarn add graphql-playground-middleware-express
bun add graphql-playground-middleware-express
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.7.23 |
| Published | 2021-11-04 |
| First published | 2017-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8826 |
| Maintainers | schickling, timsuchanek, jasonkuhrt, acao, divyenduz, huvik |
| Keywords | graphql, graphiql, playground, graphcool |

## Links

- npm: https://www.npmjs.com/package/graphql-playground-middleware-express
- Repository: https://github.com/graphcool/graphql-playground
- Homepage: https://github.com/graphcool/graphql-playground/tree/main/packages/graphql-playground-middleware-express
- Issues: https://github.com/graphcool/graphql-playground/issues
- npm.io page: https://npm.io/package/graphql-playground-middleware-express

## Dependencies (1)

- [graphql-playground-html](https://npm.io/package/graphql-playground-html.md) ^1.6.30

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 1.7.23 (latest) — 2021-11-04
- 1.5.1-beta.1 (beta) — 2018-01-15
- 1.5.0-alpha.1 (alpha) — 2018-01-15
- 1.7.22 — 2020-10-20
- 1.7.21 — 2020-09-15
- 1.7.20 — 2020-08-30
- 1.7.19 — 2020-08-30
- 1.7.18 — 2020-06-07
- 1.7.16 — 2020-06-07
- 1.7.15 — 2020-05-28
- 1.7.14 — 2020-04-11
- 1.7.13 — 2020-04-10
- 1.7.12 — 2019-02-23
- 1.7.11 — 2019-02-01
- 1.7.10 — 2019-01-28
- … 67 more at https://npm.io/package/graphql-playground-middleware-express/versions

## README

# graphql-playground-middleware-express

> Express middleware to expose an endpoint for the GraphQL Playground IDE
> **SECURITY NOTE**: All versions of `graphql-playground-express` until `1.7.16` or later have a security vulnerability when unsanitized user input is used while invoking `expressPlayground()`. [Read more below](#security-notes)

## Installation

Using yarn:

```console
yarn add graphql-playground-middleware-express
```

Or npm:

```console
npm install graphql-playground-middleware-express --save
```

## Usage

See full example in [examples/basic](https://github.com/prisma/graphql-playground/tree/main/packages/graphql-playground-middleware-express/examples/basic).

```js
const express = require('express')
const expressPlayground = require('graphql-playground-middleware-express')
  .default

const app = express()

app.get('/playground', expressPlayground({ endpoint: '/graphql' }))
```

## Security Notes

All versions before `1.7.16` were vulnerable to user-defined input to `expressPlayground()`. Read more in [the security notes](https://github.com/prisma/graphql-playground/tree/main/SECURITY.md)

### Security Upgrade Steps

To fix the issue, you can upgrade to `1.6.12` or later. If you aren't able to upgrade, see the security notes for a workaround.

**yarn:**
`yarn add graphql-playground-express@^1.7.16`

**npm:**
`npm install --save graphql-playground-express@^1.7.16`

---
_Source: https://npm.io/package/graphql-playground-middleware-express · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
