Skip to Content
This is documentation for v4 of the plugin. For v3 click here.
ESLGraphQL-ESLint
Rulesno-unreachable-types

no-unreachable-types

✅ The "extends": "plugin:@graphql-eslint/schema-recommended" property in a configuration file enables this rule.

💡 This rule provides suggestions

  • Category: Schema
  • Rule name: @graphql-eslint/no-unreachable-types
  • Requires GraphQL Schema: true ℹ️
  • Requires GraphQL Operations: false ℹ️
Requires all types to be reachable at some level by root level fields.

Usage Examples

Incorrect

# eslint @graphql-eslint/no-unreachable-types: 'error' type User { id: ID! name: String } type Query { me: String }

Correct

# eslint @graphql-eslint/no-unreachable-types: 'error' type User { id: ID! name: String } type Query { me: User }

Resources

Last updated on