What are enumerations?


An enumeration is a collection with a couple of identifying properties. A unique feature of enums is that we can make the assumptions that the value will always be ONE OF the defined options. That is, exactly one and one of the defined options.

Enumerations, enums for short, are not as commonly used in content projects, but don't let that cause you to believe they are not very powerful little structures! Because of their simplicity, we can make some assumptions that the available options MUST be one of the predefined options.

If you have an enumeration that describes a book's print status as In Print, Out of Print - we know that it can only be one of those options and it forces content editors to use only of the allowed values.

When the question can be answered with one of a list of simple answers, enums are a good option.

This is a contrast to Models which are a collection of fields that can express complex objects like locations, job descriptions, published works and more.

Where are Enums in GraphCMS?

You can find the enumerations window when in Schema view below Models, and above Configuration.

Working with Enums

Visit the Enum Guides Documentation