Content stages
#Overview
Hygraph offers two system content stages (DRAFT
& PUBLISHED
) plus the possibility to create custom ones depending on your plan.
This document discusses what these stages mean and how you can use them to create workflows.
Content stages are environment specific. This means their configuration is applied per environment. Take this into consideration if you're working with a project using more than one environment.
#What you can do
- You can save content in the
DRAFT
stage while you work on it, before it's ready to bePUBLISHED
. - You can use content staging to compare versions of content in different stages.
- In case of an error, you can quickly revert changes to the
DRAFT
stage from thePUBLISHED
stage, then use version comparison to compare the two and choose which fields to revert to thePUBLISHED
stage.
#System content stages
Hygraph has two system content stages, DRAFT
and PUBLISHED
.
DRAFT
allows people to add and edit content without affecting published content. When the content is ready to be pushed live, it is promoted to the PUBLISHED
stage.
- Content cannot be consumed by others unless it's published.
- Depending on your plan, you can create custom content stages.
- System content stages cannot be edited or deleted.
System content stages
Content in Hygraph that has been saved but has never been published exists only in the DRAFT
stage. When promoted to the PUBLISHED
stage, content will exist in that stage, and also in DRAFT
.
When you update a content entry and save without publishing, that new content will be saved in DRAFT
and the entry will show a blue PUBLISHED
pill on the content table, indicating that it's outdated.
Content being outdated means that the version currently saved in the DRAFT
stage contains changes that have not yet been promoted to PUBLISHED
.
- Content will always be created in the
DRAFT
stage. Any actions that are notpublish
orunpublish
will only affect theDRAFT
version of a content entry. If you're using the UI, that action isSave
; and if you're using the API, it'screate
orupdate
. - A
DRAFT
pill in the content table indicates that the content has been saved but has never been published. - A green
PUBLISHED
pill in the content table indicates that the currently published version of the content is the latest one. - A blue
PUBLISHED
pill in the content table indicates that theDRAFT
version is newer than thePUBLISHED
version. This means you will need to publish this content before it can be consumed by others.
#Custom content stages
Depending on your plan, you may only have access to the two system content stages that we described above, or you may have the possibility to create more.
Paid plans allow creating custom content stages, which you can use to create more sophisticated workflows.
For instance, the following diagram shows a workflow with 3 content stages: DRAFT
, APPROVAL
and PUBLISHED
.
Hygraph workflow with 3 content stages
This feature can be particularly helpful when using Custom Roles. For example, if a team member should only be able to create DRAFT
content but not move it directly to the PUBLISHED
stage, this is possible with Custom Roles.
Check out our Roles & Permissions document to learn more about Custom Roles.