Hygraph
Docs
View as Markdown

#Build your schema

Your schema defines the structure of the content in your project. You build it in the Schema builder from models, the fields you add to them, and reusable elements such as components, enumerations, and taxonomies. Hygraph generates the GraphQL Content API from your schema, so schema changes are available in the API as soon as you save them.

This section explains how to set up each part of your schema. For content modeling concepts, see Content modeling in Hygraph. For how each schema element appears in the GraphQL API, see the Schema section of the API Reference.

#Models and fields

GuideWhat it covers
ModelsCreate, edit, and delete models, add fields, and customize the content form sidebar.
Field typesThe field types Hygraph supports, and when to use each one.
Field configurationSettings, validations, and advanced options for fields.
Conditional fieldsShow fields to editors only when they need them.
Reserved termsTerms you cannot use as names in your schema.

#Schema elements

GuideWhat it covers
SlugGenerate URL-safe identifiers for entries from a template.
ComponentsDefine reusable groups of fields once and use them across models and content entries.
ReferencesConnect content entries across models, and choose the reference direction and cardinality.
Components or referencesDecide when to use a component, a reference, or both.
Remote sourcesAdd content from other systems and sources to the Hygraph API with Remote Sources, without migrating it.
Configure Remote SourcesConfigure Remote Sources to add content from other systems to the Hygraph API without migrating it.
Remote fields vs top-level remote fieldsChoose between remote fields and top-level remote fields to fetch data from a remote source.
Add remote data to your modelAdd remote fields to a model, or use top-level remote fields to fetch data unrelated to Hygraph.
Remote data troubleshootingTroubleshoot remote data errors and known issues, and refetch your data.
Remote data examplesSee examples of working with Remote Sources, remote fields, and top-level remote fields.
EnumerationsCreate predefined sets of values that editors select from.
TaxonomiesClassify content with terms arranged in a hierarchy. Taxonomies are an enterprise feature.
Best practices for taxonomiesFollow best practices for setting up taxonomies in Hygraph.
VariantsDeliver personalized versions of content entries to user Segments.

#Reuse schema from other projects

GuideWhat it covers
Import schema elementsImport models, components, remote sources, enumerations, and taxonomies from another project or template.