Socket
Socket
Sign inDemoInstall

graphql-playground-middleware-express

Package Overview
Dependencies
Maintainers
2
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

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
179K
decreased by-13.39%
Maintainers
2
Weekly downloads
 
Created

What is graphql-playground-middleware-express?

The graphql-playground-middleware-express package provides middleware for integrating GraphQL Playground, an in-browser IDE for exploring GraphQL APIs, with Express.js applications. It allows developers to easily set up a user-friendly interface for testing and interacting with their GraphQL endpoints.

What are graphql-playground-middleware-express's main functionalities?

Setting up GraphQL Playground

This feature allows you to set up GraphQL Playground at a specific endpoint in your Express application. In this example, the playground is accessible at '/playground' and it points to the GraphQL endpoint '/graphql'.

const express = require('express');
const { express: playground } = require('graphql-playground-middleware-express');

const app = express();

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

app.listen(3000, () => {
  console.log('Server is running on http://localhost:3000');
});

Customizing GraphQL Playground

This feature allows you to customize the settings of GraphQL Playground. In this example, the editor theme is set to 'dark' and the cursor shape is set to 'line'.

const express = require('express');
const { express: playground } = require('graphql-playground-middleware-express');

const app = express();

app.get('/playground', playground({
  endpoint: '/graphql',
  settings: {
    'editor.theme': 'dark',
    'editor.cursorShape': 'line'
  }
}));

app.listen(3000, () => {
  console.log('Server is running on http://localhost:3000');
});

Other packages similar to graphql-playground-middleware-express

Keywords

FAQs

Package last updated on 30 Aug 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc