Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 992 Bytes

no-unreachable-types.md

File metadata and controls

47 lines (33 loc) · 992 Bytes

no-unreachable-types

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

  • 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