What is Hygraph and how does it help build a car dealership website?
Hygraph is a headless CMS with a GraphQL-native architecture, allowing you to create custom schemas, manage content, and integrate remote data sources. For a car dealership website, Hygraph enables you to model vehicles, fetch details from external APIs like Auto.dev, and deliver content-rich experiences using frameworks such as Next.js. (Source)
How do I get started with Hygraph for my car dealership project?
To start, sign up for a free Hygraph account, create a new project, and use the intuitive GUI to build schemas for vehicles, blog posts, and other content. You can add remote sources like Auto.dev to fetch car details and use the API Playground to explore your GraphQL endpoints. (Source)
What prerequisites are needed to build a car dealership website with Hygraph?
You need basic knowledge of Next.js and Node.js, Node.js and NPM installed, a Hygraph account, and an Auto.dev account to fetch car details. (Source)
How do I create custom schemas in Hygraph?
Use the Schema menu in Hygraph's dashboard to add models for vehicles, blog posts, and other entities. You can define fields such as title, summary, VIN, price, and condition, and connect remote sources for dynamic data retrieval. (Source)
How does Hygraph integrate external APIs like Auto.dev?
Hygraph's Content Federation feature lets you add remote sources, such as REST APIs, to your schema. For example, you can connect Auto.dev to fetch vehicle data by VIN, making it accessible via Hygraph's GraphQL endpoint. (Source)
How do I manage permissions and API access in Hygraph?
Set up API access by configuring permissions in Project Settings > Access > API Access. You can create permanent auth tokens and define granular permissions for accessing content endpoints securely. (Source)
Can I use Hygraph with Next.js for my website frontend?
Yes, Hygraph works seamlessly with Next.js. You can use Apollo Client and GraphQL queries to fetch and display content from Hygraph in your Next.js application. (Source)
How do I filter car listings by price using Hygraph?
You can use GraphQL queries with where conditions to filter cars by price, such as showing cars above or below $400,000. The select field in your frontend can trigger these queries dynamically. (Source)
How do I display car details from remote sources in my application?
By connecting a remote source like Auto.dev to your Hygraph schema, you can fetch car details (make, model, engine, etc.) using the VIN field and display them in your frontend via GraphQL queries. (Source)
Is there sample code available for building a car dealership website with Hygraph?
Yes, you can find the complete code for the tutorial on GitHub at this repository. (Source)
Can I use Hygraph to manage images and assets for my car listings?
Hygraph allows you to manage static assets like images through its Assets menu. You can store, organize, and retrieve images for car listings and display them in your frontend. (Source)
How do I set up environment variables for Hygraph in my Next.js project?
Create a .env.local file in your project root and store your Hygraph endpoint and bearer token as environment variables. Use these variables to configure Apollo Client for secure API access. (Source)
What is Content Federation in Hygraph?
Content Federation is a feature that allows you to integrate external data sources into your Hygraph project, making all data accessible from a single GraphQL endpoint. This is useful for aggregating vehicle data from APIs like Auto.dev. (Source)
How do I publish content in Hygraph?
After adding entries (such as car details), click Save and then Publish to make your content live and accessible via the API. (Source)
Can I add blog posts to my car dealership website using Hygraph?
Yes, you can create a Blog Posts schema in Hygraph and add entries to display blog content on your website frontend. (Source)
How do I connect Hygraph to my frontend application?
Install @apollo/client and graphql in your frontend project, configure Apollo Client with your Hygraph endpoint and token, and use GraphQL queries to fetch and display content. (Source)
What frameworks are compatible with Hygraph?
Hygraph is compatible with modern frameworks such as Next.js, Nuxt.js, and others that support GraphQL APIs. (Source)
How do I handle image domains in Next.js when using Hygraph?
Add media.graphassets.com to the images.domains array in your next.config.js file to ensure images from Hygraph display correctly in your Next.js application. (Source)
Is Hygraph suitable for non-technical users?
Yes, Hygraph features an intuitive user interface and low-code schema builder, making it accessible for both technical and non-technical users to manage content and workflows. (Source)
Does Hygraph support integrations with other platforms?
Yes, Hygraph supports integrations with Digital Asset Management systems (Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), Adminix, Plasmic, and custom integrations via SDK or APIs. (Source)
What APIs does Hygraph provide?
Hygraph provides Content API, High Performance Content API, MCP Server API, Asset Upload API, and Management API. These APIs support querying, mutating, uploading assets, and managing project structure. (Source)
How does Hygraph ensure high performance?
Hygraph offers high-performance endpoints designed for low latency and high read-throughput, actively measures GraphQL API performance, and provides optimization best practices. (Source)
Is there technical documentation available for Hygraph?
Yes, Hygraph provides extensive documentation covering APIs, schema components, references, webhooks, and AI integrations. (Source)
How easy is Hygraph to use for content creators?
Hygraph is praised for its intuitive UI, ease of setup, and ability for non-technical users to manage content independently, reducing bottlenecks. (Source)
Pricing & Plans
What pricing plans does Hygraph offer?
Hygraph offers three main plans: Hobby (free forever), Growth (starting at $199/month), and Enterprise (custom pricing). Each plan includes different limits and features tailored to individual, small business, and enterprise needs. (Source)
What features are included in the Hobby plan?
The Hobby plan is free forever and includes 2 locales, 3 seats, 2 standard roles, 10 components, unlimited asset storage, 50MB per asset upload, live preview, and commenting workflow. (Source)
What features are included in the Growth plan?
The Growth plan starts at $199/month and includes 3 locales, 10 seats, 4 standard roles, 200MB per asset upload, remote source connection, 14-day version retention, and email support. (Source)
What features are included in the Enterprise plan?
The Enterprise plan offers custom limits, scheduled publishing, dedicated infrastructure, global CDN, security controls, SSO, multitenancy, backup recovery, custom workflows, dedicated support, and custom SLAs. (Source)
Security & Compliance
What security certifications does Hygraph have?
Hygraph is SOC 2 Type 2 compliant (since August 3, 2022), ISO 27001 certified, and GDPR compliant, ensuring high standards for data protection and privacy. (Source)
How does Hygraph protect user data?
Hygraph encrypts data at rest and in transit, provides granular permissions, audit logs, SSO integrations, regular backups, and options for dedicated hosting in multiple regions. (Source)
Use Cases & Benefits
Who can benefit from using Hygraph?
Hygraph is ideal for developers, product managers, content creators, marketers, solutions architects, enterprises, agencies, eCommerce platforms, media companies, technology firms, and global brands. (Source)
What industries are represented in Hygraph's case studies?
What business impact can customers expect from using Hygraph?
Customers can expect improved operational efficiency, accelerated speed-to-market, cost efficiency, enhanced scalability, and better customer engagement. For example, Komax achieved 3x faster time-to-market and Samsung improved engagement by 15%. (Source)
Can you share specific customer success stories?
Yes. Samsung built a scalable API-first application, Komax managed 20,000+ product variations across 40+ markets, AutoWeb increased monetization by 20%, and Voi scaled multilingual content across 12 countries. (Source)
Support & Implementation
How long does it take to implement Hygraph?
Implementation time varies by project. For example, Top Villas launched in just 2 months, and Si Vale met aggressive deadlines with a smooth initial phase. (Source)
What onboarding resources does Hygraph provide?
Hygraph offers a structured onboarding process, training resources (webinars, videos), extensive documentation, and a community Slack channel for support. (Source)
Competition & Comparison
How does Hygraph compare to traditional CMS platforms?
Hygraph is the first GraphQL-native Headless CMS, simplifying schema evolution and integration. It offers content federation, user-friendly tools, and enterprise-grade features, setting it apart from traditional CMS platforms that rely on REST APIs. (Source)
Why choose Hygraph over alternatives like Contentful or Sanity?
Hygraph stands out with its GraphQL-native architecture, content federation, scalability, and proven ROI (e.g., Komax 3x faster launches, Samsung 15% engagement boost). It ranked 2nd out of 102 Headless CMSs in the G2 Summer 2025 report and is voted easiest to implement. (Source)
How does Hygraph help reduce developer dependency?
Hygraph provides an intuitive interface for non-technical users to update content independently, reducing bottlenecks and accelerating workflows. (Source)
How does Hygraph address integration difficulties?
Hygraph offers robust GraphQL APIs, content federation, and extensive integration options, making it easier to connect third-party systems and aggregate data. (Source)
With a modern content platform like Hygraph, it’s a simple matter to tackle all of the above. Essentially a GraphQL content platform, Hygraph allows you to easily create custom schemas with its low-code schema builder and then access its stored data via the GraphQL API.
Let’s take Hygraph for a test run for the next few minutes, and see what it takes to build a car dealership website using Hygraph as a backend. This tutorial demonstrates how schemas are made and how easy it is to fetch data from a third-party API source with Hygraph. We’ll build the application frontend using Next.js.
Let’s start by obtaining the Auto.dev API keys and endpoint. Auto.dev is an automotive API provider that facilitates accessing vehicle data, such as the VIN, or listing all vehicles filtered according to your parameters. It’s simple to use and free.
Navigate to Auto.dev and create a new account by clicking Get your free API key. After creating an account, you can obtain the API endpoint and the API key from the dashboard.
Keep this tab open or save the keys somewhere—you’ll need them later.
Creating a Hygraph account
Visit the Hygraph website and click Get Started. After successfully signing up on the registration page, you can either add a project or choose a template.
For this tutorial, add a new project from scratch. Click Add Project and fill out the form with the necessary details, like the name of your project, a description, and the data storage region.
When your details are to your satisfaction, click Add Project to view a menu like this:
Schema. Allows you to create custom schemas from the intuitive GUI of Hygraph.
Content. Lets you add content to these schemas.
Assets. Lets you manage static assets like images.
API Playground. Enables you to explore the GraphQL API of your project from the dashboard.
Schemas are the heart of Hygraph. They let you create content models, add remote sources, and create enumerators depending on your preferences. So let’s create a few.
Creating schemas in Hygraph
Click Schema in the menu. You can create any type of schema you want, but for this tutorial, let’s create a model for blog posts.
Click Add next to the Models option. In the modal that opens, enter a few details about the model, like its name, the API ID you'll use to call the model, the plural form of the model, and its description.
After successfully creating the model, add the fields that this particular model offers: title, summary, and the post itself.
If you click Content from the menu at this point, you should see an option to add a new blog post.
Now that you know how to create a basic schema, let’s add a remote source for fetching vehicle details.
Adding Remote Sources to Hygraph and creating a vehicle schema
Hygraph provides a feature called Content Federation, which integrates external data sources into your Hygraph account. This enables you to easily access all your data from a single GraphQL endpoint.
This tutorial integrates the Auto.dev data source in order to access the vehicle data from the Hygraph endpoint itself. In other words, when an admin inputs a VIN of a particular vehicle into the Hygraph CMS, all the data available in Auto.dev for that vehicle can be retrieved from the GraphQL endpoint.
To achieve this, let’s add a remote source. Click Schema > Components > Add from the menu, and a new form opens up. Fill in the basic details like the name and description of the remote source, and then choose the type of source. This tutorial selects REST.
Add the base URL of the Auto.dev endpoint, which in this case is https://auto.dev/api/vin/. Add the Authorization header to authorize your requests, and add the Authorization key and the value of Bearer API_KEY so that it looks like this:
Replace API_KEY with the key that you received from the Auto.dev dashboard. You can also define custom type definitions for the API data, but let’s skip adding it for this tutorial. Click Add, and your remote source is ready.
You can now create a model to use the remote source. Click Add next to the Models option, and name it Car Detail. This model holds the car's name, a gallery for images, a description, price, and condition, along with the car details received from the API.
Add a single-line field called VIN to pass to the remote source to decode the car detail, select the REST option from the model’s sidebar, and name it something appropriate, like car info for example.
Follow this pattern to fill out the rest of the form:
Remote source. This option lets you choose which remote source you’re referencing here in case you have multiple sources. The Auto.dev API is accessible through GET request only, so there’s no need to change the default.
Input arguments. This field allows you to pass input arguments in the API call.
Path. This option allows you to append path data to the base URL. In this case, you need to append the VIN to the base URL. Using {{doc.vin}} sets the VIN of the document as a path variable. The doc object allows you to reference any field from the model. Because the API ID of VIN is vin, it’s referenced as doc.vin.
The complete model is shown below.
Adding content to Hygraph
With your model for adding car details ready, let’s add some content from the Hygraph content menu.
Click Content > Car Detail from the content menu, and then Add Entry. Let’s say you want to add a Porsche 911. The VIN of this particular model is WP0AB2A93KS114315. Fill in the form and click Save, then Publish to publish your content.
Editor's Note
You can also add a few dummy blog posts to display in the frontend via Hygraph’s Blog Posts schema.
Setting Hygraph permissions
Once you’ve added as many vehicles as you like, let’s set up Hygraph permissions to access the data in your application.
Hygraph provides you with the required endpoints, but by default, you can’t access them without setting proper permissions. To make the endpoints accessible, click Project Settings > Access > API Access. The content API endpoint is the endpoint for accessing the data in this case. You’ll need this string later.
To create a permanent auth token to use for accessing the data, scroll down the API Access page and click Add Token under under the Permanent Auth Token.
Give the token a name and a description, set the stage as Published, and click Add & configure permissions. On the permissions page, copy the bearer token. This tutorial leaves the values in the Content API section set to their default.
Your Hygraph setup is complete, but keep a note of the content endpoint and the bearer token. You’ll need them to connect the frontend.
Creating a new Next.js project is simple. Type the following command in the terminal:
npx create-next-app@latest APP_NAME
Replace APP_NAME with the name of your application. To keep this article simple, choose options similar to the image below when configuring the template.
Editor's Note
Note that this tutorial doesn’t use TypeScript or any other styling library like Tailwind.
Create a components folder in the root directory and add a new file called CarCard.jsx for displaying the car details on the homepage. Paste the following code in this component:
This component takes a few props for displaying the image, description, name, price, condition and the make of the car.
Create a new file called Car.module.css inside the styles folder and paste the following code inside it:
.container{
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 20px;
}
.image{
width: 200px;
height: 150px;
margin-right: 20px;
object-fit: cover;
border-radius: 5px;
}
.description{
display: flex;
flex-direction: column;
}
.name{
font-size: 1.5rem;
font-weight: bold;
margin: 0;
}
.make{
font-size: 1rem;
color: gray;
margin: 5px 0;
}
.details{
font-size: 1rem;
margin: 0;
}
.price{
font-size: 1rem;
color: gray;
}
.condition{
font-size: 1rem;
color: gray;
}
.button{
width: 7rem;
}
And your car card is ready. To display the details of the car on a separate page, create a new file called [id].jsx inside the pages folder. This page will work as a dynamic route.
Create a new file called CarDetails.module.css under the styles folder and paste in the following code:
.container{
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 20px;
}
.imageContainer{
flex-basis: 40%;
margin-right: 20px;
}
.image{
width: 100%;
height: auto;
object-fit: cover;
border-radius: 5px;
}
.detailsContainer{
flex-basis: 60%;
}
.name{
font-size: 2rem;
margin: 0;
}
.makeYear{
font-size: 1.5rem;
color: gray;
margin: 10px 0;
}
.model{
font-size: 1.5rem;
margin: 0;
}
.transmission{
font-size: 1rem;
color: gray;
margin-bottom: 20px;
}
.description{
margin-top: 20px;
}
.description h2{
font-size: 1.5rem;
margin: 0;
}
.description p{
font-size: 1rem;
margin: 10px 0;
}
Editor's Note
We are going to assume you’re already familiar with CSS and React or Next.js, so this tutorial doesn’t go in-depth about styles and basic JSX code.
Add media.graphassets.com to your next.config.js file, or else your images won’t display. Replace your next.config.js file contents with:
/** @type {import('next').NextConfig} */
const nextConfig ={
reactStrictMode:true,
images:{
domains:['media.graphassets.com'],
},
};
module.exports= nextConfig;
With design complete, let’s connect Hygraph with your application.
Connecting Hygraph with the frontend
To connect Hygraph with the frontend, first install two dependencies—graphql and @apollo/client—by running the following command:
npm i @apollo/client graphql
Create a new file called .env.local in the root directory and save the Hygraph endpoint and the bearer token as follows:
The component is wrapped using the ApolloProvider, and the client is passed as a prop. You can access the custom hooks defined at @apollo/client from anywhere in the app now.
Let’s write a GraphQL query to get all the car details. Open the index.js file and import the following:
import{ useEffect, useState }from'react';
import{ gql, useQuery }from'@apollo/client';
importCarCardfrom'@/components/CarCard';
The useQuery hook allows you to run the queries written using gql. The useQuery hook returns three values: loading, error, and data. Until the data or an error is received, the loading value stays true. The error throws an error if there’s any, otherwise, it’s undefined, and the data holds all the data received from the endpoint.
Replace the content of Home component with the following:
exportdefaultfunctionHome(){
const[price, setPrice]=useState('all');
const{ loading, error, data }=useQuery(gql`
query MyQuery {
carDetails(where: {
${price ==='moreThan4'?'price_gt: 400000':''}
${price ==='lessThan4'?'price_lt: 400000':''}
${price ==='all'?'price_gt: 0':''}
}) {
id
description
gallery {
url
}
nameOfTheCar
price
condition
}
}
`);
const options =[
{value:'all',label:'All'},
{value:'moreThan4',label:'> 400000'},
{value:'lessThan4',label:'< 400000'},
];
constonChange=(e)=>{
setPrice(e.target.value);
console.log(e.target.value);
};
return(
<>
<Head>
<title>Create Next App</title>
<metaname='description'content='Generated by create next app'/>
The logic is straightforward here. The page has a simple select field to filter the cars. There are three view options inside the folder:
All cars
Cars that have a price lower than $400,000
Cars with a price higher than $400,000
Depending on the data, the CarCard component is rendered in a loop. For each car, the details are passed as a prop to it. A React state is defined to store the price of the chosen select value to filter cars. By default, the select field will have all as the value.
Run a query using the useQuery hook and gql.
query MyQuery{
carDetails(where:{
${price ==='moreThan4'?'price_gt: 400000':''}
${price ==='lessThan4'?'price_lt: 400000':''}
${price ==='all'?'price_gt: 0':''}
}){
id
description
gallery {
url
}
nameOfTheCar
price
condition
}
}
`);
The MyQuery has a where condition. Depending on the chosen select value, it shows cars that cost more or less than $400,000. If the select field value is all, it shows cars that cost more than $0. This query returns the ID, description, gallery image URLs, name, price, and condition of the car.
The options for the select field are hard-coded for now. The onChange function that sets the price state is defined.
Inside the return statement, the options are mapped to display them inside the select field. If loading is true, it shows a loading message, otherwise, it maps the data received from the API and passes it inside the prop of the CarCard component.
The homepage is ready, so let’s move on to the car details page, where you’ll use the data received from the remote source.
Depending on the ID of the route, let’s fetch the data from the API. Write a new GraphQL query and extract the values from there. Paste this code above the return statement:
const query = gql`
query carDetail_carInfo($id: ID!) {
values: carDetail(where: { id: $id }) {
nameOfTheCar
description
gallery {
url
}
carInfo
}
}
`;
const{ loading, error, data }=useQuery(query,{variables:{ id }});
const{ values }= loading ?{values:{}}: data;
This is similar to the query used for the homepage. The main difference is that the variable is the id of the Hygraph content ID here, and another value called carInfo is fetched from the endpoint. This carInfo endpoint returns the data received from the remote source.
If you take a look at the code for this page, you can see that the car make, model, engine, number of doors, and a few other data are fetched directly from the remote source using the Hygraph GraphQL endpoint.
Your application is now ready to test. Run the code with the npm run dev command from your terminal. This starts the Next.js server on http://localhost:3000. The following GIF demonstrates the application in action.
Your car dealership website is ready for the world!
Hygraph is a headless CMS that allows you to create highly customizable and powerful applications without worrying about the backend stack. You got to explore this functionality just now building a custom website with Hygraph and Next.js specifically for a hypothetical car dealership. This tutorial used the Auto.dev API as a remote data source to fetch information about car models via their VINs; the remote source response was directly accessible through Hygraph’s GraphQL endpoint.
Subha Chanda is a freelance web developer who's passionate about learning and experimenting with new things. He loves to write about what he's found out.
Share with others
Sign up for our newsletter!
Be the first to know about releases and industry news and insights.