🎉 Welcome to the new GraphQL-ESLint website. Try new playground page →
Relay Connection Types


  • Category: Schema
  • Rule name: @graphql-eslint/relay-connection-types
  • Requires GraphQL Schema: false ℹ️
  • Requires GraphQL Operations: false ℹ️

Set of rules to follow Relay specification for Connection types.

  • Any type whose name ends in "Connection" is considered by spec to be a Connection type
  • Connection type must be an Object type
  • Connection type must contain a field edges that return a list type that wraps an edge type
  • Connection type must contain a field pageInfo that return a non-null PageInfo Object type

Usage Examples


# eslint @graphql-eslint/relay-connection-types: 'error'
type UserPayload { # should be an Object type with `Connection` suffix
  edges: UserEdge! # should return a list type
  pageInfo: PageInfo # should return a non-null `PageInfo` Object type


# eslint @graphql-eslint/relay-connection-types: 'error'
type UserConnection {
  edges: [UserEdge]
  pageInfo: PageInfo!