no-unreachable-types
â
The "extends": "plugin:@graphql-eslint/schema-recommended"
property in a configuration file
enables this rule.
đĄ This rule provides suggestions (opens in a new tab)
- 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
}