# graphql-playground-middleware-koa

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

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

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

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

## Links

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

## 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.6.22 (latest) — 2021-11-04
- 1.3.0-beta.3 (beta) — 2017-11-30
- 1.6.21 — 2020-10-20
- 1.6.20 — 2020-09-15
- 1.6.19 — 2020-08-30
- 1.6.18 — 2020-08-30
- 1.6.17 — 2020-06-07
- 1.6.15 — 2020-06-07
- 1.6.14 — 2020-05-28
- 1.6.13 — 2020-04-10
- 1.6.12 — 2019-02-23
- 1.6.11 — 2019-02-01
- 1.6.10 — 2019-01-28
- 1.6.9 — 2019-01-27
- 1.6.8 — 2018-11-23
- … 28 more at https://npm.io/package/graphql-playground-middleware-koa/versions

## README

# graphql-playground-middleware-koa

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

## Installation

Using yarn:

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

Or npm:

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

## Usage

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

```js
const koa = require('koa')
const koaRouter = require('koa-router')
const koaPlayground = require('graphql-playground-middleware-koa')

const app = new koa()
const router = new koaRouter()

router.all('/playground', koaPlayground({ endpoint: '/graphql' }))
```

## Security Notes

All versions before `1.6.15` were vulnerable to user-defined input to `koaPlayground()`. 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.15` or later. If you aren't able to upgrade, see the security notes for a workaround.

**yarn:**
`yarn add graphql-playground-koa@^1.6.15`

**npm:**
`npm install --save graphql-playground-koa@^1.6.15`

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