Frequently Asked Questions

Getting Started & Prerequisites

What do I need before building a simple navigation in Hygraph?

To build a simple navigation in Hygraph, you need a Hygraph account and an active project. You can sign up for free if you don't have an account. For your project, you can either create a new one, clone the Navigation Cookbook project, or use an existing project. For more details, see the prerequisites section in the documentation.

How can I get started with the simple navigation recipe?

You can follow the step-by-step guide to create a simple navigation model in your own project, or you can clone the pre-built Navigation Cookbook project that contains all navigation recipes. Cloning lets you compare different navigation configurations without starting from scratch. Find the clone link and instructions in the Clone project section.

Features & Capabilities

What is the simple navigation model in Hygraph?

The simple navigation model in Hygraph is a content model that contains an ID and a component field allowing multiple values. This setup lets you create navigation entries with as many navigation links as needed, each linking to internal or external documents. It is designed for flexibility and ease of use in building basic navigation menus. Learn more in the overview section.

What are components and references in Hygraph navigation models?

Components are reusable sets of fields that can be used across models and content entries, acting as flexible templates. References are relations between content entries, allowing you to connect and reuse content efficiently. In navigation models, components define the structure of navigation links, while references enable linking to internal content like products, blogs, or stores. See more in the core concepts section.

Can I add both internal and external links to my navigation?

Yes, the simple navigation model allows you to add both internal links (using references to models like Product, Blog, or Store) and external links (using a slug field for URLs). You can configure each navigation link to use either an internal reference or an external URL, depending on your needs. For setup details, see the link component creation guide.

How flexible is the simple navigation model for different projects?

The simple navigation model is highly flexible. You can use it to create different navigation elements for your project by adding as many navigation links as needed. The model supports both internal and external links, and you can customize it further by adjusting the schema to fit your project's requirements. For more advanced navigation, Hygraph also offers styled and sectioned navigation recipes. Explore these options in the Styled navigation and Sectioned navigation guides.

What are the benefits of using navigation components in Hygraph?

Navigation components in Hygraph provide clear, user-friendly directions for end-users, enhancing user experience by guiding them through your platform. The Navigation component abstracts navigation logic, allowing for reuse across multiple pages and simplifying integration. For more, see the navigation blog post.

Implementation & Best Practices

What are the main steps to create a simple navigation in Hygraph?

The main steps are: (1) Create referenceable models (e.g., Product, Blog, Store); (2) Create a Link component with fields for label, internal reference, and external URL; (3) Add a slug field and the Link component to the Simple Navigation model; (4) Add navigation entries as needed. For a detailed walkthrough, see the step-by-step guide.

Can I clone a ready-made navigation project instead of building from scratch?

Yes, Hygraph provides a pre-built Navigation Cookbook project that you can clone. This project contains all navigation recipes, allowing you to compare and use different navigation configurations without building each one manually. Clone the project from the Clone project section.

Where can I find more resources and documentation about navigation in Hygraph?

You can find more resources in the official Hygraph documentation, including guides on components and references. For advanced navigation, see the Styled navigation and Sectioned navigation recipes.

Support & Community

Where can I get help or suggest new navigation recipe ideas?

You can join the Hygraph Community Slack to ask questions, get help, and suggest new recipe ideas. The community and Hygraph team are active and responsive to user feedback.

What support and training resources does Hygraph offer?

Hygraph offers 24/7 support via chat, email, and phone, as well as an Intercom chat for real-time troubleshooting. There is also a Community Slack channel, extensive documentation, webinars, live streams, and how-to videos. Enterprise customers receive a dedicated Customer Success Manager and structured onboarding. See Hygraph Documentation for more details.

Security & Compliance

What security and compliance certifications does Hygraph have?

Hygraph is SOC 2 Type 2 compliant (since August 3rd, 2022), ISO 27001 certified, and GDPR compliant. These certifications ensure that Hygraph meets high standards for security and data protection. For more details, see the security features page.

What security features are available in Hygraph?

Hygraph provides granular permissions, SSO integrations, audit logs, encryption at rest and in transit, regular backups, and enterprise-grade compliance features. These ensure robust security for your content and data. See the security features page for more information.

Performance & Product Experience

How does Hygraph ensure high performance for content delivery?

Hygraph uses Smart Edge Cache for enhanced performance and faster content delivery, high-performance endpoints for reliability and speed, and provides practical advice for optimizing GraphQL API usage. For more details, see the high-performance endpoint blog post.

How easy is Hygraph to use for non-technical users?

Hygraph is frequently praised for its intuitive user interface, making it easy for both technical and non-technical users to set up and manage content. It was recognized for "Best Usability" in Summer 2023, and users highlight its flexibility and user-friendliness. See more at Hygraph's Try Headless CMS page.

Advanced Navigation & Customization

Are there more advanced navigation recipes available in Hygraph?

Yes, in addition to the simple navigation recipe, Hygraph offers styled and sectioned navigation recipes for more complex use cases. These recipes provide additional customization and structure for your navigation needs. Explore them at Styled navigation and Sectioned navigation.

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

#Simple navigation

#Overview

This guide shows how to build a simple navigation using a slug field and components.

Our simple navigation will be a content model containing an ID and component field that allows multiple values. This way, to create a navigation using this configuration, you can create a content entry with its own ID, and as many navigation links as you need.

Use this simple model to create a basic navigation containing labelled navigation items that can link to both internal and external documents.

Simple navigationSimple navigation

#Prerequisites

  • REQUIRED: You need to have a Hygraph account. If you don't have one, you can sign up here.
  • REQUIRED: You need to have a Hygraph project.
    • OPTION 1: Create a project. This is the way to go if you want to follow the entire tutorial for learning purposes.
    • OPTION 2: Clone the cookbook project. This is the way to go if you're curious about how the Navigation elements are made but don't want to follow the step-by-step creation process. This project contains the entire Navigation Cookbook so you can compare them, or look into what instances they contain.
    • OPTION 3: Use an existing project of yours. If you have a project already and want to add this Navigation to it, this is the way to go. In this case, you may need to adjust parts of the tutorial to your own project schema.

#Core concepts

In this guide, you'll work with references, components and basic component fields. Let's look into these concepts:

  • Component: a predefined set of fields that can be reused across models and content entries. You can think of a component as a flexible, reusable template: you define the fields that will be used inside a component once, and then fill them with different content every time you use it in a content entry.

  • Basic component field: a component is a special field type in your Hygraph schema that defines which components of which type can be used in a model. Component fields can be of basic or modular types. A basic component field can only have one component attached to it. You can limit the number of component instances to one, or allow multiple component instances to be added in the content entry.

  • References: References are relations between two or more content entries in your project. With references, you can reuse content entries by connecting them. Once the relation is configured, you can also use it to create related content from the content creation screen.

#What you can do

This guide offers two paths:

  • Path 1: Use this guide to create a simple navigation that you can use in your Hygraph projects.
  • Path 2: Clone the project that contains the entire Navigation cookbook to compare the different navigation configurations without having to clone multiple projects.

#Clone project

We have prepared a project that contains the entire Navigation cookbook:

Clone this project

This cookbook contains all the recipes we have so far to create navigation elements, so you can compare the different navigation configurations without having to clone multiple projects.

To find this particular recipe in the cookbook project, navigate to the schema and look for "Simple Navigation".

#Step-by-step guide

Before we can build our Simple Navigation model, we need to create other schema elements that we can later add to it.

To make this guide easier to follow, we've divided it in steps for you.

#1. Create models

We'll start by creating three sample models - Product, Store, and Blog - that we will use as referenceable models later to create our navigation items.

We'll click + Add next to Models and use the following information:

FieldInput
Display NameProduct
API IDProduct
API ID PluralProducts

Create modelsCreate models

We'll click Add Model to save.

Normally, we'd add fields to these models, but for the sake of this example, we'll simply leave them empty.

Repeat the process to create a second model:

FieldInput
Display NameBlog
API IDBlog
API ID PluralBlogs

We'll click Add Model to save.

And one final time for our third model:

FieldInput
Display NameStore
API IDStore
API ID PluralStores

We'll click Add Model to save.

Finally, we will create one more model for our simple Navigation, using the following information:

FieldInput
Display NameSimple navigation
API IDSimpleNavigation
API ID PluralSimpleNavigations

We'll click Add Model to save. This model won't stay empty, but before we can add fields to it, we need to build a component.

We want our navigation to contain a link component that will allow us to add multiple links to our navigation. We'll click + Add next to Components and add it using this information:

FieldInput
Display NameLink
API IDLink
API ID PluralLinks

Create a link componentCreate a link component

We'll click Add component to save. It's time to start adding instances to this component.

First, we'll add a Single line text field by clicking on it on the Add fields right sidebar.

We'll use the following information:

TabFieldInput
SettingsDisplay NameLink label
SettingsAPI IDlinkLabel
SettingsUse as title field checkboxSelect this checkbox

Link component - LabelLink component - Label

We'll click Add to save.

We want our navigation to offer the possibility to add both internal and external links. To do this, we'll add a reference for the internal links, and a slug field for the external ones. In this case, we won't be making them required fields, because users will either use one or the other.

We'll start with the reference field. We'll find the Reference field on the Add fields right sidebar, click on it, and use the following information:

TabFieldInput
DefineReference typeSelect Allow multiple models to be referenced (Union Type)
DefineModels to referenceUse the dropdown menu to select Product, Blog and Store
DefineReference directionSelect One-way reference
DefineRelation cardinalitySelect One to One
Configure referenceDisplay NamePage
Configure referenceAPI IDpage

Link component - ReferenceLink component - Reference

We'll click Add to save. We've configured the reference in such a way that when we find this field in a content entry, it will allow us to select an entry from the models that we selected.

Finally, we'll add a slug field for our external URLs, using the following information:

TabFieldInput
SettingsDisplay NameExternal URL
SettingsAPI IDexternalUrl
SettingsLowercase checkboxLeave this checkbox selected
ValidationsSet field as unique checkboxLeave this checkbox selected
ValidationsMatch a specific pattern checkboxLeave this checkbox selected, and use the dropdown to select the URL pattern. Write "Input value does not match the expected format." in the Custom error message field.

Link component - External URLLink component - External URL

We'll click Add to save.

#3. Add fields to the Navigation model

We'll go back into our Simple Navigation model now, to add fields to it. The reason we're creating this navigation as a model, is so that we can then create an entry per navigation that we want to build using this configuration.

First, we will add a slug field that will be our navigation ID. We'll click on the Slug field in the Add fields right sidebar and use the following information:

TabFieldInput
SettingsDisplay NameNavigation ID
SettingsAPI IDnavigationId
SettingsLowercase checkboxLeave this checkbox selected
SettingsUse as title field checkboxSelect this checkbox
ValidationsSet field as unique checkboxLeave this checkbox selected
ValidationsMatch a specific pattern checkboxLeave this checkbox selected, and use the dropdown to select the Slug pattern. Write "Input value does not match the expected format." in the Custom error message field.

Simple navigation - IDSimple navigation - ID

We'll click Add to save.

Now it is time to add the link component that we created earlier. We'll click on the Basic component field in the Add fields right sidebar and use the following information:

TabFieldInput
SettingsDisplay NameNavigation links
SettingsAPI IDnavigationLinks
SettingsAllow multiple values checkboxSelect this checkbox
SettingsSelect componentUse the dropdown to select the "Link" component

Simple navigation - Link componentSimple navigation - Link component

We'll click Add to save. In this case, we've allowed multiple values so that we can add as many links as we want to our navigation.

Simple navigationSimple navigation

This guide helped you create the schema element yourself. Alternatively, you can clone a project containing all our navigation recipes.

Check out the next document section for that!