Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>GraphQL PlaygroundNew to Visual Studio Code? Get it now.
GraphQL Playground

GraphQL Playground

nati

|
1 install
| (0) | Free
An Altair-style GraphQL client inside VS Code: run queries, explore schemas, inspect responses.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GraphQL Playground for VS Code

An Altair-style GraphQL client that lives inside a VS Code editor tab. Write queries with schema-aware autocomplete, run them, and inspect responses — without leaving your editor.

Features

  • Rich query editor — CodeMirror 6 with GraphQL syntax highlighting, bracket matching, folding, and schema-backed autocomplete (Ctrl+Space).
  • Schema introspection — point at any endpoint and the extension pulls the schema for autocomplete and the docs explorer.
  • Docs explorer — browse root types, drill into fields/arguments/enums, and search the type map, GraphiQL-style.
  • Variables & headers — JSON variables editor and a toggleable key/value headers table (auth tokens, tracing headers, etc.).
  • Response viewer — pretty-printed JSON with HTTP status, timing, and size.
  • Requests run from the extension host, so CORS never gets in the way.
  • Multiple tabs, history of the last 50 requests, and full state persistence across reloads.

Usage

  1. Press Cmd/Ctrl+Alt+G, or run GraphQL: Open Playground from the Command Palette.
  2. Enter a GraphQL endpoint (a public demo API is pre-filled). The schema is introspected automatically.
  3. Write your operation and press Cmd/Ctrl+Enter to run it.
  4. Toggle Variables / Headers below the editor; switch the right pane between Response, Docs, and History.

Configuration

Setting Default Description
graphqlPlayground.defaultEndpoint https://countries.trevorblades.com/ Endpoint pre-filled in new tabs.
graphqlPlayground.requestTimeoutMs 30000 Abort a request after this many ms.

Development

npm install          # install deps (approve esbuild's build script if prompted)
npm run build        # bundle extension + webview into out/
npm run watch        # rebuild on change

Then press F5 in VS Code to launch an Extension Development Host, and run GraphQL: Open Playground.

Packaging

npm run vsix         # produces graphql-playground-<version>.vsix (needs @vscode/vsce)

Architecture

src/extension.ts   Extension host: command + webview panel, performs HTTP
                   requests (fetch) so responses aren't blocked by CORS,
                   persists state in globalState.
webview/main.ts    The UI app: tabs, toolbar, editors, response/docs/history.
webview/editors.ts CodeMirror 6 setup (GraphQL + JSON) themed from VS Code vars.
webview/docs.ts    Schema documentation explorer.

The webview and host communicate over postMessage. The webview never makes network calls itself — it asks the host to execute / introspect.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft