opencode
opencode copied to clipboard
feat(lsp): Add GraphQL LSP server support
Summary
This PR adds GraphQL Language Server support to OpenCode, enabling IDE-like features (autocomplete, hover info, diagnostics, go-to-definition) for GraphQL projects.
Changes
- Auto-detection via
.graphqlrc.*orgraphql.config.*files - Auto-installs when not found in system
- Supports, standalone files and inline GraphQL in .graphql, .gql, .ts, .tsx, .js, .jsx, .vue, .svelte, .astro files
Testing
Tested locally with:
- Opening and files in GraphQL projects
- Opening inline GraphQL in TypeScript/JavaScript/Vue files
- Verified LSP server spawns automatically when GraphQL config files are detected
- Checked diagnostics for invalid GraphQL syntax
- Tested autocomplete and hover information
- Confirmed coexistence with Biome LSP (no conflicts)
Fixes #9308