@soda-gql/lsp
v0.13.0
Published
GraphQL Language Server Protocol implementation for soda-gql
Maintainers
Readme
@soda-gql/lsp
GraphQL Language Server Protocol (LSP) implementation for soda-gql. Provides real-time diagnostics, completions, hover information, and other IDE features for soda-gql tagged template queries.
Features
- Diagnostics — Real-time validation of GraphQL field selections against your schema
- Completion — Field name suggestions based on parent type and schema
- Hover — Type information for fields, arguments, and variables
- Go to Definition — Navigate to fragment definitions and schema type locations
- Find References — Locate all usages of a fragment across the workspace
- Rename — Rename fragment definitions and all their spread references
- Document Formatting — Format GraphQL content within tagged templates
- Document Symbols — Outline view of queries, mutations, and fragments in a file
- Code Actions — Extract selections into fragments
- Multi-schema — Supports multiple GraphQL schemas in a single project
- Monorepo multi-config — Discovers and loads multiple
soda-gql.config.tsfiles across workspace folders
Installation
bun add @soda-gql/lspUsage
Standalone CLI
Run the LSP server directly via the bundled binary:
npx soda-gql-lsp --stdioProgrammatic API
import { createLspServer } from "@soda-gql/lsp";
const server = createLspServer();
server.start();Pass a custom connection for testing or embedding:
import { createConnection, ProposedFeatures } from "vscode-languageserver/node";
import { createLspServer } from "@soda-gql/lsp";
const connection = createConnection(ProposedFeatures.all);
const server = createLspServer({ connection });
server.start();Supported Editors
- VS Code / Cursor — Via the soda-gql VS Code extension
- Any LSP-compatible editor — Neovim, Emacs, Sublime Text, etc. using the standalone CLI
Related Packages
- @soda-gql/core — Core GraphQL query generation
- soda-gql-vscode-extension — VS Code extension with syntax highlighting and LSP integration
- @soda-gql/builder — Build-time transformation pipeline
Guides
- LSP-Integrated Development Workflow — How to use the LSP for daily development
- Tagged Template Syntax Guide — Syntax reference for tagged templates
License
MIT
