Koa middleware for exposing the GraphQL Playground IDE endpoint. Current stable version is 1.6.22. Maintained as part of the graphql-playground project (formerly graphcool). Key differentiator: provides an interactive GraphQL IDE with subscription support, docs, and collaboration features. Security vulnerability in versions <1.6.15 due to unsanitized user input. Ships TypeScript types. Peer dependency on Koa v2.
npm install graphql-playground-middleware-koaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a Koa server with GraphQL Playground middleware at /playground, pointing to a GraphQL endpoint at /graphql and a WebSocket subscription endpoint.
Upgrade to >=1.6.15 or sanitize user input before passing to koaPlayground()
Use const koaPlayground = require('graphql-playground-middleware-koa') in CJS, or import without destructuring in ESMOnly pass plain serializable options (endpoint, subscriptionEndpoint, etc.)
Use import instead of require, or ensure your project uses CommonJS throughout
Use const koaPlayground = require('graphql-playground-middleware-koa') without destructuringPass an options object with at least { endpoint: '/graphql' }