Your schema is built by defining content models, and shape your content. You can think of a model similar to a collection in NoSQL or database table.
You can define your model fields within the GraphCMS schema editor.
Working with Models
Create a model:
- Navigate to the schema editor in the side-bar.
If you don't see it, your role does not have access to the schema editor.
- In the collapsible side-bar, click the "+ Add" button.
- In the modal that appeared, fill in your model information.
We will suggest plural naming suggestions for you.
- Press "Create Model" to enter the field editor window.
Try to think of your content as semantic building blocks and not about their end presentation. For example a model called
Gallery might just as easily be queried as images related to a product, post or other top-level content block in your content domain.
Add fields to a model
- To add a field, press any of the top-level field-types in the right-hand side-bar.
- Fill out the information for the field.
More information about working with fields here.
- You can click-and-drag any of the fields in your model to change their order.
View system fields
Toggle the "show system fields" toggle at the top of the field editor window. You are not able to modify system fields, but you can see which ones are added by default to your model.
Edit or delete a model
- Click on the disclosure ellipses next to the name of your model.
- Choose between "edit" and "delete"
Assets are a system model that are present on every GraphCMS project. You can add additional fields to the asset here but you cannot modify or remove the pre-defined fields they come with.