opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(lsp): Add GraphQL LSP server support

Open sandiiarov opened this issue 14 hours ago • 1 comments

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.* or graphql.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

sandiiarov avatar Jan 18 '26 23:01 sandiiarov