New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-graphiql

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-graphiql

Integrate GraphiQL IDE in your Vite projects

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
79
decreased by-30.7%
Maintainers
1
Weekly downloads
 
Created
Source

Vite + GraphqiQL

Integrate GraphiQL IDE in your Vite projects


Please note that this plugin is only intended to be used in development mode.

Getting Started

First, install the plugin:

npm install --save-dev vite-plugin-graphiql

yarn add --dev vite-plugin-graphiql

pnpm add --save-dev vite-plugin-graphiql

GraphiQL requires graphql to be installed in your project; so install that too if you haven't already.

Then, import and add the plugin to your vite.config.ts and pass in the required configuration options:

import { defineConfig } from 'vite'
import graphiql from 'vite-plugin-graphiql'

export default defineConfig({
  plugins: [
    graphiql({
      client: {
        url: 'https://mygraphqlapi.com/graphql',
      },
    }),
  ],
})

Now start your dev server and navigate to http://localhost:5173/__graphiql to see the GraphiQL IDE.

Configuration

You can find the full configuration options here.

Acknowledgments

Inspired by @unocss/inspector

License

Licensed under the MIT License.

Keywords

FAQs

Package last updated on 17 Dec 2022

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