noUnreachableTypes
| Property | Value |
|---|---|
| Config name | noUnreachableTypes |
| Default severity | warn |
| Context | Schema |
| In recommended | Yes |
What it checks
Section titled “What it checks”Detect types unreachable from root operations.
Examples
Section titled “Examples”# ❌ Bad — OrphanType is unreachabletype Query { user: User}
type User { id: ID!}
type OrphanType { id: ID!}# ✅ Good — all types reachable from Querytype Query { user: User}
type User { id: ID!}Configuration
Section titled “Configuration”extensions: graphql-analyzer: lint: rules: noUnreachableTypes: warn