Skip to content

Add experimental TypeScript 7.1 native diagnostics - #425

Open
JoviDeCroock wants to merge 3 commits into
mainfrom
feat/typescript-71-native-api
Open

Add experimental TypeScript 7.1 native diagnostics#425
JoviDeCroock wants to merge 3 commits into
mainfrom
feat/typescript-71-native-api

Conversation

@JoviDeCroock

@JoviDeCroock JoviDeCroock commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary

  • add an experimental @0no-co/graphqlsp/native entry for batch diagnostics over TypeScript 7.1 native snapshots
  • reuse GraphQLSP's real document discovery, interpolation, validation, diagnostic codes, and source mapping
  • isolate native snapshot/schema/config caches and restore the legacy TypeScript binding after every call
  • keep the existing TypeScript 5/6 tsserver plugin unchanged
  • add executable coverage using real gql.tada inference and the current TypeScript 7.1 native API

This is intentionally not presented as editor-plugin parity. TypeScript 7.1 does not expose a public equivalent of PluginCreateInfo for injecting GraphQLSP's completions, hovers, definitions, refactors, and code actions into its LSP responses. Co-located-fragment analysis and field-usage tracking remain disabled in the native batch lane for the same reason.

The fixture currently dogfoods typescript@7.1.0-dev.20260821.1, including microsoft/typescript-go#4712. Content mappers add useful future span-mapping infrastructure for foreign source files, but do not replace GraphQLSP's editor integration for GraphQL tags in ordinary TypeScript files.

Verification

  • pnpm exec prettier --check ...
  • pnpm build
  • pnpm test:e2e — 58 passed
  • pnpm test:native — 1 passed
  • packed gql.tada and @0no-co/graphqlsp, installed both into a clean TypeScript 7.1 consumer, and verified inferred result types plus exact GraphQL diagnostic mapping

@changeset-bot

changeset-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 100d11a

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

@JoviDeCroock
JoviDeCroock marked this pull request as ready for review August 22, 2026 05:49
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