Easily restore your project to a previous version with our new Instant One-click Backup Recovery

Structure

Enjoy the flexibility of establishing content models, reusable components, and references through the UI or programmatically with the SDK.

#Schema Builder

Define the structure of your content API using our low-code schema builder with a variety of field options like text, assets, numbers, maps, and even connect content models to share information and scale faster.

Hygraph's Schema Builder feature

#References

Link different content models together and define the relationship as either a one-way or two-way, a one-to-many or many-to-one reference. You can predefine the model to reference or create unions such that content editors can choose from a list of predefined models (for e.g., choosing which type of block to display on a page).

#Validations

Ensure data is entered correctly by defining validations per field with a predefined set of methods or fully customized ones using regular expressions. You can add custom error messages to guide editors, and require editors to match a specific input or restrict certain inputs. Validations apply to both the UI and mutations API.

#Components

Make content creation significantly faster and flexible by using components, a predefined set of fields to be used across multiple models. You define the fields that will be used inside a component once, and then content teams can fill them with different content every time it's used in a content entry.

You can choose to add basic components (allowing one component per field) or modular components (allowing multiple components per field) in a model.

#Management SDK

Use our typed SDK to execute operations without using the UI, allowing for multiple schema-related actions to be executed in order and in a single transaction. Manage schema changes in code and under version control.

It allows accepting a set of changes which are applied on an “all or none” basis. So if anything fails in one of the events along the process, everything is rolled back automatically.

import { Client } from '@hygraph/management-sdk';
const client = new Client({
authToken: '...',
endpoint: '...',
});
const run = async () => {
client.createModel({
apiId: 'Post',
apiIdPlural: 'Posts',
displayName: 'Post',
});
const result = await client.run(true);
if (result.errors) {
throw new Error(result.errors);
}
return result;
};
run()
.then((result) => console.log(`Finished migration at: ${result.finishedAt}`))
.catch((err) => console.error('Error: ', err));

Get started for free, or request a demo to discuss larger projects