Socket
Socket
Sign inDemoInstall

graphql-playground-middleware-express

Package Overview
Dependencies
67
Maintainers
6
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    graphql-playground-middleware-express

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


Version published
Weekly downloads
239K
decreased by-4.62%
Maintainers
6
Install size
279 kB
Created
Weekly downloads
 

Readme

Source

graphql-playground-middleware-express

Express middleware to expose an endpoint for the GraphQL Playground IDE SECURITY NOTE: All versions of graphql-playground-express until 1.7.16 or later have a security vulnerability when unsanitized user input is used while invoking expressPlayground(). Read more below

Installation

Using yarn:

yarn add graphql-playground-middleware-express

Or npm:

npm install graphql-playground-middleware-express --save

Usage

See full example in examples/basic.

const express = require('express')
const expressPlayground = require('graphql-playground-middleware-express')
  .default

const app = express()

app.get('/playground', expressPlayground({ endpoint: '/graphql' }))

Security Notes

All versions before 1.7.16 were vulnerable to user-defined input to expressPlayground(). Read more in the security notes

Security Upgrade Steps

To fix the issue, you can upgrade to 1.6.12 or later. If you aren't able to upgrade, see the security notes for a workaround.

yarn: yarn add graphql-playground-express@^1.7.16

npm: npm install --save graphql-playground-express@^1.7.16

Keywords

FAQs

Last updated on 04 Nov 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc