A TypeScript Language Service plugin that provides GraphQL autocompletion, validation, and type generation for client development.
ts-graphql-plugin is a TypeScript Language Service plugin that enhances GraphQL client development within TypeScript projects. It provides real-time features like autocompletion, query validation, and type generation for GraphQL operations embedded in TypeScript files, directly inside code editors that support TypeScript.
TypeScript developers building GraphQL clients who want integrated tooling (autocomplete, validation, type safety) directly in their editor without switching to external GraphQL IDEs.
It deeply integrates GraphQL intelligence into the TypeScript Language Service, offering a seamless developer experience with features like real-time diagnostics, type generation, and editor support that many standalone GraphQL tools lack.
TypeScript Language Service Plugin for GraphQL developers
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides autocompletion, error diagnostics, go-to-definition, and hover info for GraphQL directly in TypeScript-aware editors like VS Code, leveraging the Language Service for a seamless developer experience without switching tools.
Supports local schema files, remote HTTP endpoints with authentication headers, and custom JavaScript scripts for dynamic schema fetching, accommodating various GraphQL server setups including complex auth flows.
Includes commands for type generation, operation extraction, validation, and reporting, enabling automated workflows and documentation generation from GraphQL operations found in TypeScript sources.
Offers a custom TypeScript transformer for webpack to statically convert GraphQL template strings to AST objects at build time, reducing runtime overhead for GraphQL client applications.
Setting up requires detailed configuration in tsconfig.json, including schema endpoints, tags, and exclusions, which can be error-prone and time-consuming, especially for dynamic schema scripts.
The webpack transformer intentionally does not operate in development watch mode, as noted in the README, limiting real-time build feedback during active development.
Full functionality relies on editors supporting the TypeScript Language Service plugin system; while VSCode and Vim are confirmed, others may require additional setup or have inconsistent support.
Requires GraphQL version 15.x.0 or later and specific TypeScript setups, which might not be compatible with older projects or alternative GraphQL implementations without upgrades.