graphql-playground-middleware-koa

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

MIT 43 个版本
安装
npm install graphql-playground-middleware-koa
yarn add graphql-playground-middleware-koa
pnpm add graphql-playground-middleware-koa
bun add graphql-playground-middleware-koa
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

Installation

Using yarn:

yarn add graphql-playground-middleware-koa

Or npm:

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

Usage

See full example in examples/basic.

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

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

版本列表
1.6.22 2021-11-04
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
1.6.7 2018-11-14
1.6.6 2018-10-16
1.6.5 2018-10-16
1.6.4 2018-08-23
1.6.3 2018-07-06
1.6.2 2018-06-26
1.6.1 2018-05-31
1.6.0 2018-05-24
1.5.1 2018-04-11
1.5.0 2018-03-29
1.4.3 2018-03-22
1.4.2 2018-02-01
1.4.1 2018-01-22
1.4.0 2018-01-15
1.3.8 2018-01-13
1.3.7 2018-01-06
1.3.6 2017-12-04
1.3.5 2017-12-04
1.3.1 2017-12-01
1.3.0-beta.3 2017-11-30
1.3.0-beta.2 2017-11-30
1.3.0-beta.1 2017-11-30
1.3.0 2017-12-01
1.2.1-beta.7 2017-11-29
1.2.1-beta.4 2017-11-29
1.2.0 2017-11-24
1.1.4 2017-11-15
1.1.3 2017-11-15
1.1.2 2017-11-07