Frequently Asked Questions

Schema Design: Components vs References

What is a component in Hygraph, and when should I use one?

A component in Hygraph is a predefined set of fields that can be reused across multiple models and content entries. You define the fields once in your schema, then fill them with different content each time the component is used in an entry. Use components when you want to reuse a field structure across models, create content from scratch each time, simplify the content creation screen, or when your project relies on content duplication. Note: If a component becomes very large, it can crowd the editing screen and introduce performance issues; in such cases, consider using a reference instead. Source.

What is a reference in Hygraph, and when should I use one?

A reference in Hygraph is a relation between two or more content entries, allowing you to reuse existing entries by connecting them. Use references when you want to link to content that already exists, reuse content unchanged across multiple entries, or when the related content is large enough that completing it in an overlay is preferable to filling it in inline. Note: References can be less intuitive for editors unfamiliar with relational models, and not all relation types are duplicated when an entry is copied. Source.

How do components and references differ in terms of content reuse?

Components are best for reusing a field structure across models, where each use is filled in from scratch. References are best for reusing existing content entries by linking them. For example, use references to attach author profiles to blog posts, or use components to add an author field directly to each post when maintaining individual profiles isn't practical. Note: Components are always duplicated with their parent entry, while only certain reference types are duplicated. Source.

Can I combine components and references in a Hygraph schema?

Yes, components and references are not mutually exclusive. You can use them together when you need a consistent field structure that also links to existing content entries. For example, a component can contain a reference field, allowing you to link to related products or authors while maintaining a consistent structure. Note: Combining both increases schema complexity and may require additional planning for editor experience. Source.

What are some practical examples of using components and references?

For components: In an e-commerce project, use a modular component field for product type, so each product type (e.g., clothing, accessories) has its own required fields, keeping the editing screen clean. For references: Use a two-way reference field to link products to categories, allowing a product to belong to multiple categories without duplicating data. Note: For very large or complex content, references may provide a better editor experience than large components. Source.

How does content duplication work with components and references in Hygraph?

When duplicating entries, components are always duplicated with their parent entry. For references, only two-way references with many-to-many or many-to-one cardinality are duplicated. Other relation types are not duplicated. Note: If your workflow relies heavily on duplicating related content, plan your schema accordingly. Source.

What are the limitations of using components or references in Hygraph?

Large components can crowd the content editing screen and may introduce performance issues. References can be less intuitive for editors unfamiliar with relational models, and not all reference types are duplicated when copying entries. For substantial, standalone content, references may provide a better editing experience. Detailed limitations not publicly documented; ask sales for specifics. Source.

Features & Capabilities

What integrations does Hygraph support for content modeling and schema design?

Hygraph supports integrations with Digital Asset Management systems (Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), hosting and deployment platforms (Netlify, Vercel), Product Information Management (Akeneo), and other tools like Adminix and Plasmic. For a full list, visit the Hygraph Marketplace. Note: Integration capabilities may vary by plan and project requirements. Source.

What APIs are available for managing schemas and content in Hygraph?

Hygraph provides several APIs: the GraphQL Content API for querying and manipulating content, the Management API for handling project structure, the Asset Upload API for uploading files, and the MCP Server API for secure AI assistant communication. For details, see the API Reference documentation. Note: API usage may require appropriate permissions and setup. Source.

Where can I find technical documentation for schema components and references in Hygraph?

Technical documentation for schema components and references is available in the Components Documentation and References Documentation. These guides cover definitions, use cases, and best practices for structuring content models. Note: Documentation is updated regularly; check for the latest guidance. Source.

Implementation & Editor Experience

How do components and references affect the editor experience in Hygraph?

Components help keep the content creation screen focused and dynamic, allowing editors to select only relevant component types and supporting conditional required fields. References are best for linking to existing content but can be less intuitive for editors unfamiliar with relational models. For large, standalone content, references may provide a better editing experience than large components. Note: Editor experience may vary based on schema complexity and team familiarity. Source.

Security & Compliance

What security and compliance certifications does Hygraph hold?

Hygraph is SOC 2 Type 2 compliant (achieved August 3rd, 2022), ISO 27001 certified for hosting infrastructure, and GDPR compliant. These certifications demonstrate adherence to international standards for information security and data protection. Note: For more details, visit the Hygraph Secure Features page. Source.

Use Cases & Success Stories

What are some real-world use cases for components and references in Hygraph?

Components are ideal for modular content structures, such as product types in e-commerce, where each type has unique required fields. References are suited for linking reusable content, such as associating products with categories or authors with blog posts. For example, Komax used Hygraph to manage over 20,000 product variations across 40+ markets, and Voi scaled multilingual content across 12 countries and 10 languages. Note: Use case fit depends on your content structure and workflow needs. Source.

LLM optimization

When was this page last updated?

This page wast last updated on 12/12/2025 .

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

#Components or references

Components and references can both be used to reuse and structure content, but they serve different purposes. This guide explains the key differences, when to choose one over the other, and when to combine them.

#Definitions

ComponentsComponents

A component is a predefined set of fields reusable across models and content entries. You define the fields once in the schema, then fill them with different content each time the component is used in an entry.

ReferencesReferences

A reference is a relation between two or more content entries in your project. References let you reuse existing entries by connecting them. Once a relation is configured, editors can also create related content directly from the content editor.

#How to choose

Because both features support content reuse, the right choice depends on how your content is structured and how your editors work. The sections below cover the main factors to consider.

#Repeated content

Use components when you want to reuse a field structure across multiple models. Defining the structure once as a component saves developers from recreating the same fields repeatedly. Each time the component is used in an entry, editors fill it in from scratch.

Use references when you want to reuse existing content entries rather than a field structure. You set up the related model and create the entries first, then link them to other entries using a reference field.

Example: Attaching authors to blog posts

  • With references, create author entries in a dedicated Author model, then link them to posts. This works well when you have a known set of authors, each with their own profile.
  • With components, add an author component instance directly to each post and fill in the fields each time. This works well when many different people can be authors and maintaining individual author profiles isn't practical.

#Simplified content creation screen

Components help keep the content creation screen focused and easier to navigate. Instead of displaying all fields at once, a modular component field lets editors select only the component types relevant to the entry they're creating. This results in a more dynamic and streamlined editing experience.

Components also support conditional required fields. For example, a modular component containing different product types can mark certain fields as required only when that product type is selected. This guarantees minimum required information is captured for every entry without cluttering the screen with irrelevant fields.

References can produce a similar result when a related model acts as a structured form. Editors fill in the data through an overlay when creating or linking a related entry. However, this approach typically results in more models and can be a less intuitive experience for editors unfamiliar with how relations work.

#Editor experience

References work best for linking to existing content. The flow is straightforward. Editors search for and attach an existing entry. Components are not a good fit for this use case.

However, if editors are expected to create new related entries rather than just link to existing ones, references can become confusing. For example, creating a new author from inside a book entry, through a relation overlay, may not feel intuitive to editors accustomed to more traditional CMS interfaces. In that scenario, components are often the better choice.

Exception: when a component becomes very large, it can crowd the content editing screen and introduce performance issues. If the content in question is a substantial, standalone piece of information, such as a detailed author profile with many fields, a reference may be preferable, since editors can complete that larger form in an overlay rather than inline.

In summary:

  • Use references when linking to something that already exists.
  • Use components when creating content from scratch, unless the component would be very large, in which case a reference with an overlay may provide a better editing experience.

#Content duplication

If your project relies on content duplication, note that not all relation types are duplicated when an entry is copied. Only the following are duplicated:

  • Two-way references with many-to-many or many-to-one cardinality, where more than one model can be referenced.
  • Two-way references with many-to-many cardinality, where only one model can be referenced.

Components are always duplicated with their parent entry.

For a complete breakdown, see Duplicating content.

#Conclusion

Use components when:

  • Your project reuses the same field structure across multiple models.
  • Content is created from scratch each time the structure is reused.
  • You want a simplified, dynamic content creation screen for editors.
  • Your project relies on content duplication.

Use references when:

  • You want to link to content that already exists.
  • Content is reused unchanged across multiple entries. For example, a shared set of related posts in a blog.
  • The related content is large enough that completing it in an overlay is preferable to filling it in inline.

#Combining components and references

Components and references are not mutually exclusive. You can use them together when you need a consistent field structure that also links to existing content entries.

For example, you could create a component containing a title, a slug, and a reference field. Reused across different models, this component could link to related products, new arrivals, products from the same vendor, or books by the same author, while keeping the structure consistent.

#Example use cases

Components: An e-commerce project that sells multiple product types. Listing all possible product fields on a single edit screen makes it hard to navigate, and those fields cannot be made required universally since not all products share the same attributes. A better approach is a Product model with common fields, such as name and description at the model level, and a modular component field for product type. Each component (for example, one for clothing and one for accessories) defines its own set of required fields. Those fields appear only when the relevant product type is selected, keeping the screen clean and ensuring that all published entries include the minimum required information.

References: An e-commerce project with Category and Product as separate models, where a product can belong to more than one category. The two models are connected through a two-way reference field, letting editors link products to categories without duplicating data.