Reference Type

References, also referred to as relations, are a powerful Field Type found within the Schema Builder that links different content models together.

Activity Detail Relation to Activity Tag
  • High flexibility in creating your content model

    Pascal F.
  • The support team is top notch. Everyone at Hygraph has been excellent and exceptionally helpful while we built out our data model and integrations. The team is incredibly responsive and receptive to new features ideas. 10/10.

    Jason K.
  • Hygraph is just so easy to use. Creating new data models and populating them for use on the front end is intuitive and the interface is very clean. The product is designed in a way that it's obvious they were thinking about their users.

  • Hygraph is a way for us to allow non-engineers at our company to create content for our marketing website. Once the engineers define the data model within GraphCMS, other employees at our company can easily add the content through their UI, and once published, our build system automatically rebuilds the website with the new content.

    Hygraph User

One-Way Relations

An extension of our Reference Type Feature, One-Way References, like the name implies, can be used when the content model has only one relation or one direction that the information needs to be served from or connected to.

An example of One-Way Reference could include something like placing a legal footer at the bottom of particular content pieces. The information of the footer can be shared to that content piece, but the content it's attached to does not need to be shared with the footer model. In these cases, One-Way References can help reduce clutter within your Hygraph project and help improve performance.

One-Way References Product Update September 2021

Two-Way References

Two-Way References creates relationships between content entries to share information. This type of Reference comes in four forms: one to one, one to many, many to one, and many to many. Essentially, both the referenced material and the referring material can be queried from either side.

To better explain it, we use the example of a blog piece and the author it's tied to. Think of a form of filtering or connecting, where we are trying to answer two questions: what blog posts has the author written, and sharing the author information within the blog post itself? By creating a Two-Way Reference in the Schema Builder, Content Creators can connect their blog post with their author profile to add their credentials easily within their blog post and connect all of their previous blogs to their profile.


Union Type

Union Types, sometimes called Sortable Relations, are relations where developers are able to build a highly flexible basic model and content editors have the power to make changes to the presentation without changing the inherent structure. Teams can to change the order of specific relations of a content entry right from the UI enabling even more flexibility to how content will appear in its final form. 

Specifically for Hygraph, Union Types allow for multiple models to be connected using a single relation. Teams can then choose which model to connect on a given content entry and in what order they would like the multiple models to be displayed.