Schema

Last updated 9 months ago

The schema is the bedrock of your project. You can read more about GraphQL schemas proper here. In GraphCMS, the Schema tab of a project window allows you to define models and enumerations.

As a developer, you have full control over the shape of your project's schema. You can define who can view the content from the CMI, who can query it from the API, what fields the model supports and what options an enum contains. For more information on which default user types have access to a model by default, see the information below.

Models

A model is an object of one or more fields.

Fields

  • Single Line Text

  • Multi Line Text

  • Markdown

  • Integer

  • Float

  • Checkbox

  • Date

  • DateTime

  • JSON

  • Enumeration (Reference/Select)

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.

Values

  • Display Name (String)

  • API ID (Unique)

  • Description (String)

  • Possible Values (Array: String)