Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@apollographql/graphql-playground-html

Package Overview
Dependencies
Maintainers
6
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollographql/graphql-playground-html

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

  • 1.6.29
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
907K
decreased by-17.91%
Maintainers
6
Weekly downloads
 
Created

What is @apollographql/graphql-playground-html?

@apollographql/graphql-playground-html is a package that provides a way to embed GraphQL Playground, an interactive, in-browser GraphQL IDE, into your web applications. It allows developers to test and document their GraphQL APIs with ease.

What are @apollographql/graphql-playground-html's main functionalities?

Embedding GraphQL Playground

This feature allows you to embed the GraphQL Playground into your web application. The code sample demonstrates how to include the necessary script and initialize the playground with a specified GraphQL endpoint.

<script src="https://cdn.jsdelivr.net/npm/@apollographql/graphql-playground-html@latest/build/static/js/middleware.js"></script>
<div id="playground"></div>
<script>
  window.addEventListener('load', function (event) {
    GraphQLPlayground.init(document.getElementById('playground'), {
      endpoint: '/graphql'
    })
  })
</script>

Custom Configuration

This feature allows you to customize the configuration of the GraphQL Playground. The code sample shows how to set custom settings such as the editor theme and cursor shape.

<script src="https://cdn.jsdelivr.net/npm/@apollographql/graphql-playground-html@latest/build/static/js/middleware.js"></script>
<div id="playground"></div>
<script>
  window.addEventListener('load', function (event) {
    GraphQLPlayground.init(document.getElementById('playground'), {
      endpoint: '/graphql',
      settings: {
        'editor.theme': 'dark',
        'editor.cursorShape': 'line'
      }
    })
  })
</script>

Other packages similar to @apollographql/graphql-playground-html

FAQs

Package last updated on 25 May 2021

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