@apollographql/graphql-playground-middleware-koadeprecated

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

Usage no npm install needed!

<script type="module">
  import apollographqlGraphqlPlaygroundMiddlewareKoa from 'https://cdn.skypack.dev/@apollographql/graphql-playground-middleware-koa';
</script>

README

graphql-playground-middleware-koa

Koa middleware to expose an endpoint for the GraphQL Playground IDE

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' }))