An ESLint plugin that validates GraphQL query strings against a schema for Apollo, Relay, Lokka, and FraQL clients.
eslint-plugin-graphql is an ESLint plugin that validates GraphQL query strings against a schema directly within JavaScript or GraphQL files. It ensures queries are syntactically correct and match the schema's structure, preventing runtime errors in GraphQL applications.
Developers using GraphQL with clients like Apollo, Relay, Lokka, or FraQL who want to integrate static query validation into their linting process.
It provides early error detection for GraphQL queries, supports multiple GraphQL clients out of the box, and integrates seamlessly with ESLint for consistent code quality enforcement.
:vertical_traffic_light: Check your GraphQL query strings against a schema.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Built-in configurations for Apollo, Relay, Lokka, and FraQL clients simplify integration across different GraphQL setups without custom tweaks.
Validates queries at lint time against the schema, catching syntax errors, missing fields, and type mismatches before runtime failures.
Accepts schema from JSON files, strings, or .graphqlconfig, allowing multiple integration methods to fit existing workflows.
Supports configurable validators and multiple schemas with different tags, enabling tailored rules for complex applications.
Apollo has stated plans to deprecate this plugin with minimal future support, making it a risky choice for new projects despite current functionality.
Setup requires specifying schema via JSON or files, with caveats like incompatibility with eslint --cache, and managing ESLint config can be error-prone.
Relies on template literal tags for query identification; comment-based queries aren't supported natively, necessitating workarounds that add overhead.