Enums in GraphQL

Published on October 15th, 2019

graphql icon

Enum (short for Enumeration) is GraphQL special type that represents set of predefined values. You’ll mostly use this type when you need more options than just Boolean, but still want to use only controlled set of values.

enum articleStatus {
  IDEA
  DRAFT
  PUBLISHED
}