Skip to content

feat: add TypeScript 7 editor features and LSP proxy - #442

Open
JoviDeCroock wants to merge 2 commits into
mainfrom
feat/ts7-editor-support
Open

JoviDeCroock wants to merge 2 commits into
mainfrom
feat/ts7-editor-support

Conversation

@JoviDeCroock

@JoviDeCroock JoviDeCroock commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

TypeScript 7 does not load language service plugins. Building on the API sessions from #439, this adds GraphQL editor features through those sessions and an npm-packaged LSP proxy for clients that can launch a custom TypeScript server.

The native editor paths now provide diagnostics for unsaved documents, hover, resolved completions, schema definitions, cross-file fragment references and rename, quick fixes, and fragment extraction. VS Code connects to its existing native TypeScript server; other LSP clients can launch graphqlsp --stdio without a VSIX. Both paths require TypeScript 7.1+ and keep configuration in compilerOptions.plugins. An npm install and tsconfig entry alone do not activate GraphQLSP in stock VS Code with TS 7.

  • Share language feature operations across the classic plugin and native sessions; preserve native LSP capabilities and ordinary TypeScript operations.
  • Resolve GraphQL completion items locally, reject stale cross-file edits, and handle cancellation and native-mode transitions.
  • Recover local schemas after edits, deletion, and recreation; await named schemas before the first request.
  • Windows stays unsupported for TS 7: the sync client can't connect to API pipes there, and the relay is Unix-only.
  • Add cross-platform packaging CI, a real VS Code harness, regression coverage, and setup/API/development documentation for both installation paths.

Validation

The runs below were on Windows, through a launcher-based relay that has since been removed (aa25882). They don't cover the supported macOS/Linux paths, which still need a run before merge.

Local validation on Windows with Node.js 22, VS Code 1.136.2, TypeScript Native Preview 1.0.1, and TypeScript 7.1.0-beta:

  • 149 regression tests passed across 28 files; both packages typecheck.
  • 13 automated checks passed against the installed final VSIX in an isolated real VS Code profile, including applied completion, rename, quick fixes, and extraction; schema recovery; server restart; and classic/native switching.
  • The documented npm-only setup passed 7 checks in a separate project, including the exact standalone-check script, LSP launch command, hover, unsaved diagnostics, and shutdown.
  • Independent adversarial review findings were addressed; its native shutdown stress run passed 14/14 cases. Documentation links were also checked through actual VSIX processing.

Limits

Native TS 7.1 can still hang in API-session cleanup. The proxy drains its worker, requests clean native shutdown, and uses a documented two-second fallback to terminate the native child and acknowledge shutdown before waiting for the client's exit.

macOS/Linux CI jobs are configured but have not been run locally. The newer middleware adapter has unit coverage; the actual editor run used the released extension's older API. Standalone .graphql language features and navigation from generated gql.tada turbo-cache result types back into queries remain outside this integration.

@changeset-bot

changeset-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aa25882

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@0no-co/graphqlsp Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

The relay compiled a C# launcher with csc.exe into a temp directory at
runtime. Restore the explicit Windows error until TypeScript's sync client
can connect to API pipes, and drop Windows from CI and the docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant