Frequently Asked Questions

Features & Capabilities

What are reference fields in Hygraph and how do they work?

Reference fields in Hygraph are relations between two or more content entries, allowing you to connect entries according to your schema configuration. For example, you can link an Author to a Blog Post or a Category to a Product. Reference fields support four cardinality types: one-to-one, one-to-many, many-to-many, and many-to-one, each enabling different ways to relate content entries. For more details, see the Using References Guide.

What types of references can I create in Hygraph?

Hygraph supports four types of references based on cardinality:

Learn more in the Reference Types section.

How do I add or create referenced content entries in Hygraph?

You can add existing content entries as references using the Add existing <model_name> button, or create and add new entries with the + Create & add new <model_name> button. The process varies slightly depending on the reference type, but generally involves selecting the model and then the entries to relate. For step-by-step instructions, see the How to Use References section.

How many content entries can be displayed in the reference field UI?

For projects created after June 14, 2022, the UI displays up to 100 content entries in the content form. For projects created before that date, up to 500 entries are displayed. You can add more entries, but to fetch related entries beyond these limits, you must query the API.

Where can I learn more about configuring references in Hygraph?

You can learn more about configuring references in your schema by visiting the References documentation.

Technical Requirements & Developer Experience

What developer guides are available for working with references and components?

Hygraph provides detailed developer guides on working with references and components. These guides help you decide whether to use a component or a reference in your project schema and offer step-by-step instructions for creating, editing, and publishing content. Access the guides at Components and References Guide and Using References Guide.

How does Hygraph support developers in managing content relationships?

Hygraph offers an intuitive UI for managing content relationships, including reference fields, components, and schema configuration. Developers can leverage the API to fetch related entries beyond UI limits and use extensive documentation for guidance. The platform also provides a free API playground and a free forever developer account for hands-on exploration. For more, see Hygraph Documentation.

Use Cases & Benefits

What are common use cases for reference fields in Hygraph?

Common use cases for reference fields include linking authors to blog posts, categories to products, and establishing relationships between various content models. This enables flexible content modeling and supports complex digital experiences, such as ecommerce catalogs, multi-author blogs, and product categorization.

How does Hygraph help teams manage content creation and approval?

Hygraph provides structured content workflows that help teams manage content creation and approval in a clear and organized way. This ensures that content passes through necessary review stages and supports collaboration between team members. Learn more at the Content Workflows Guide.

Support & Implementation

What support and resources are available for getting started with Hygraph?

Hygraph offers extensive documentation, a free API playground, webinars, live streams, and how-to videos. Customers can access 24/7 support via chat, email, and phone, and join the community Slack channel for expert advice. Enterprise customers receive a dedicated Customer Success Manager and a structured onboarding process. For more, visit Hygraph Documentation and Enterprise CMS page.

Security & Compliance

What security and compliance certifications does Hygraph have?

Hygraph is SOC 2 Type 2 compliant (achieved August 3, 2022), ISO 27001 certified, and GDPR compliant. These certifications ensure robust security and adherence to international standards. For more details, see the Security Features page and Security Report.

Performance & Reliability

How does Hygraph ensure high performance and reliability for content delivery?

Hygraph uses Smart Edge Cache for enhanced performance and faster content delivery, especially for high-traffic and global audiences. The platform features high-performance endpoints and measures GraphQL API performance, providing practical advice for developers to optimize usage. For more, see the High-Performance Endpoint blog post.

Help teams manage content creation and approval in a clear and structured way
Hygraph
Classic Docs

#Using references

#Overview

References are relations between two or more content entries that you can create in Hygraph.

This document gets into how to use the different reference types in the Hygraph app.

#What you can do

  • You can use the reference field in the Content editor to connect content entries to one another according to schema configuration.

Examples of this could be linking an Author to a Blog Post, or a Category to a Product.

#Reference types

There are four different reference types according to reference cardinality, which determines if it will be possible to connect one or many entries to the parent entry, as well as the directions of that relation.

  • One to one references: They allow adding a reference to one content entry from the model configured as referenceable. An example of this reference type could be the relation between a country and its capital. Each country has only one capital, and each capital belongs to only one country.
  • One to many references: They allow adding references to multiple content entries from the model configured as referenceable. An example of this reference type could be an author that is related to many blog posts.
  • Many to many references: They allow adding references to multiple content entries from the different models configured as referenceable. An example of this reference type could be the relation between product and category. A product can belong to multiple categories and the category may also have many products linked to it.
  • Many to one references: They allow adding references to multiple content entries of the parent model to the model configured as referenceable above. An example of this reference type could be a number of blog posts related to a single author.

#How to use references

References are used in similar ways, irrespective of their type. In general terms, you have the option to add an existing content entry, or create & save a new one.

Depending on reference type and configuration, you may have to select a model before you can select an entry, and then you will be able to select one or more content entries to relate to the parent entry.

Here is a detailed explanation on how to work with each reference type:

#One to one

Use the Add existing <model_name> button to select a content entry from the referenceable model. Simply click on the selection icon to select the entry you want. You will then return to the current content creation screen, and will find the selected entry added as reference.

You can also use the + Create & add new <model_name> button to create and save a new related content entry. This button takes you to the content creation form for the configured model, where you can create a new entry then click on Save or Save & Publish. You will then return to the current content creation screen, and will find the new reference added to the reference field.

The referenceable model is the one configured in the Schema. Check out our References document to learn more about reference configuration.

#One to many

Use the Add existing <model_name> button to select one or more content entries from the referenceable model. Simply click on the checkboxes of the entries you want to reference in order to select them, then click on Add selected <model_name>. You will then return to the current content creation screen, and will find the selected entries added as references.

You can also use the + Create & add new <model_name> button to create and save a new related content entry. This button takes you to the content creation form for the configured model, where you can create a new entry then click on Save or Save & Publish. You will then return to the current content creation screen, and will find the new reference added to the reference field.

The referenceable model is the one configured in the Schema. Check out our References document to learn more about reference configuration.

#Many to many

Use the Add existing <model_name> button to select one of the referenceable models. Clicking on a model name takes you to the entry selection screen for that model. Simply click on the checkboxes of the entries you want to reference in order to select them, then click on Add selected <model_name>. You will then return to the current content creation screen, and will find the selected entries added as references.

You can optionally click on Add existing <model_name> again to select entries from a different model.

You can also use the + Create & add new <model_name> button to select one of the referenceable models that you want to use to create and save a new related content entry. This button takes you to the content creation form for the configured model, where you can create a new entry then click on Save or Save & Publish. You will then return to the current content creation screen, and will find the new reference added to the reference field.

The referenceable model is the one configured in the Schema. Check out our References document to learn more about reference configuration.

#Many to one

Use the Add existing <model_name> button to select one of the referenceable models. Clicking on a model name takes you to the entry selection screen for that model. Simply click on the selection icon to select the entry you want. You will then return to the current content creation screen, and will find the selected entry added as reference.

You can also use the + Create & add new <model_name> button to select one of the referenceable models that you want to use to create and save a new related content entry. This button takes you to the content creation form for the configured model, where you can create a new entry then click on Save or Save & Publish. You will then return to the current content creation screen, and will find the new reference added to the reference field.

The referenceable model is the one configured in the Schema. Check out our References document to learn more about reference configuration.