A Vite plugin that integrates the GraphiQL IDE into your Vite development server at a dedicated endpoint (/__graphiql). Current stable version is 1.1.0 (Dec 2022), with monthly releases adding features like support for @graphiql/plugin-explorer. Requires Vite ^2.9.0 || ^3.0.0 and graphql as peer dependencies. Intended for development only. Key differentiator: easy setup of GraphiQL in Vite projects without manual configuration of webpack or other bundlers.
npm install vite-plugin-graphiqlVerified import paths — ran on the pinned version, not inferred.
Minimal setup: import the plugin and add it to Vite config with a GraphQL endpoint URL.
Do not use in production builds; conditionally add plugin with a Vite conditional plugin array.
Set client.url in plugin options instead of configuring the client dist path.
Run npm install graphql --save or equivalent.
There is no workaround; if you need a custom path, fork the plugin.
N/A
Run npm install graphql
Use import graphiql from 'vite-plugin-graphiql' instead of import { graphiql } from 'vite-plugin-graphiql'Remove any manual client configuration and use the default or set client.url correctly.