Enumeration Types

Learn how GraphQL enumeration is used to deal with a known list of values.

Enumeration types, or enums, are special scalars restricted to a particular set of allowed values. Enumeration types allow us to do the following:

  • Validate that the arguments of a type are one of the allowed values.

  • Convey through the type system that a field will always be one of a finite set of values.

Here’s what an enum definition may look like in the GraphQL schema language:

Get hands-on with 1200+ tech skills courses.