Express middleware that exposes the GraphQL Playground IDE (an interactive GraphQL client with introspection, subscriptions, and documentation) as a route in your Express server. Current stable version is 1.7.23, with infrequent releases. Key differentiator: more feature-rich than GraphiQL, offering subscription support, theming, and collapsible docs. Alternatives: graphiql-express, altair-express. Note: versions before 1.7.16 had a security vulnerability when passing unsanitized user input to expressPlayground().
npm install graphql-playground-middleware-expressNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to set up a GraphQL Playground route at /playground with a GraphQL endpoint at /graphql using CommonJS.
Upgrade to >=1.7.16. If unable to upgrade, sanitize user input before passing to expressPlayground().
Evaluate alternatives such as @graphiql/toolkit or altair-express for ongoing support.
Always call expressPlayground({ ... }) to generate middleware.Use require('graphql-playground-middleware-express').default or switch to ESM import.Replace require('graphql-playground-middleware-express') with require('graphql-playground-middleware-express').default.Ensure you call expressPlayground({ endpoint: ... }) to produce middleware.Run 'npm install graphql-playground-middleware-express' in your project root.