Frequently Asked Questions

Next.js + Hygraph Implementation

How do I set up a new Next.js project to work with Hygraph?

To set up a new Next.js project for Hygraph integration, initialize a Next.js 14 app using npx create-next-app my-next-project. During setup, select: Typescript: No, ESLint: Yes, Tailwind CSS: Yes, src/ directory: No, App Router: Yes, Import alias: No. After installation, adjust app/globals.css to keep only Tailwind imports, run npm install, and start the app with npm run dev. Note: This guide assumes familiarity with Node.js and npm. Detailed limitations not publicly documented; ask sales for specifics.

How do I configure Hygraph assets to work with the Next.js image component?

To use Hygraph assets with the Next.js image module, add Hygraph's asset domain to next.config.js under the images.remotePatterns property. Example: set hostname: '**.graphassets.com' and dangerouslyAllowSVG: true. This enables Next.js to optimize and serve images from Hygraph. Note: Always review security implications when enabling SVGs. Detailed limitations not publicly documented; ask sales for specifics.

How do I fetch and render content from Hygraph in a Next.js app?

Clone the Hygraph demo project to get a sample content model. Set up Content API access permissions in Hygraph under Project settings > Access > API Access > Content API, then copy the High Performance Read-only Content API endpoint. In your Next.js app, store this endpoint in an .env file and use fetch requests to query content via GraphQL. See the official guide for code samples. Note: API permissions must be configured for unauthenticated requests. Best fit for teams comfortable with API-based workflows; teams needing a traditional CMS UI may want to consider alternatives.

How do I create dynamic page routes in Next.js using Hygraph content?

Create a directory app/pages/[slug] and a page.js file inside it. Use a function to fetch content from Hygraph based on the slug parameter and render the page dynamically. This leverages Next.js App Router's dynamic routing. Note: This approach requires familiarity with dynamic routing in Next.js. Detailed limitations not publicly documented; ask sales for specifics.

Features & Capabilities

What APIs does Hygraph provide for integration with Next.js?

Hygraph offers several APIs relevant for Next.js integration: the GraphQL Content API (for querying and manipulating content), the Management API (for project structure), the Asset Upload API (for uploading files), and the MCP Server API (for AI assistant integration). For details, see the API Reference documentation. Note: Some APIs may require additional configuration or permissions. Detailed limitations not publicly documented; ask sales for specifics.

What integrations are available with Hygraph?

Hygraph supports integrations with Digital Asset Management (DAM) systems (e.g., Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), hosting platforms (Netlify, Vercel), Product Information Management (Akeneo), commerce solutions (BigCommerce), and translation/localization tools (EasyTranslate). For the full list, visit the Hygraph Marketplace. Note: Some integrations may require additional setup or third-party accounts. Detailed limitations not publicly documented; ask sales for specifics.

What technical documentation is available for Hygraph and Next.js integration?

Hygraph provides comprehensive technical documentation, including API references, schema guides, getting started tutorials, and integration guides for platforms like Mux and Akeneo. For Next.js-specific implementation, see the official guide. Note: Documentation is updated regularly; always check for the latest version. Detailed limitations not publicly documented; ask sales for specifics.

Performance & Security

How does Hygraph ensure high performance for content delivery in Next.js applications?

Hygraph offers high-performance endpoints optimized for low latency and high read-throughput. The read-only cache endpoint provides 3-5x latency improvement for faster content delivery. Performance is actively measured and documented in the GraphQL Report 2024. Note: Actual performance may vary based on project complexity and network conditions. Best fit for teams prioritizing API speed; teams needing static site generation may need to benchmark for their use case.

What security and compliance certifications does Hygraph hold?

Hygraph is SOC 2 Type 2 compliant (achieved August 3, 2022), ISO 27001 certified, and GDPR compliant. The platform features granular permissions, SSO integrations (OIDC/LDAP/SAML), audit logs, encryption in transit and at rest, regular backups, and secure API policies. For more, see the Secure Features page. Note: Some compliance features may require enterprise plans. Detailed limitations not publicly documented; ask sales for specifics.

Use Cases & Business Impact

What types of projects or teams benefit most from using Hygraph with Next.js?

Hygraph is well-suited for developers, content creators, product managers, and marketing professionals in enterprises or high-growth companies. It is used in SaaS, eCommerce, media, healthcare, automotive, and more. Teams needing advanced content management, content federation, and API-first workflows benefit most. Note: Teams requiring a traditional monolithic CMS or without API experience may need additional onboarding. Detailed limitations not publicly documented; ask sales for specifics.

What business impact have customers seen using Hygraph?

Customers have reported faster time-to-market (e.g., Komax achieved 3x faster launches), improved engagement (Samsung saw a 15% increase), and cost reductions (AutoWeb increased monetization by 20%). For more, see the case studies. Note: Results depend on implementation and project scope. Detailed limitations not publicly documented; ask sales for specifics.

Onboarding & Support

How long does it take to implement Hygraph with Next.js, and what onboarding resources are available?

Implementation time varies: Top Villas launched in 2 months, Voi migrated from WordPress in 1-2 months. Onboarding resources include a free signup, structured onboarding calls, technical kickoffs, starter projects, documentation, and community Slack. See Getting Started for details. Note: Complex migrations may require additional planning. Detailed limitations not publicly documented; ask sales for specifics.

What feedback have customers given about Hygraph's ease of use?

Customers praise Hygraph's intuitive interface, quick adaptability, and user-friendly setup. For example, Sigurður G. (CTO) noted the UI is intuitive for non-technical users, and Charissa K. (Senior CMS Specialist) highlighted its clear setup and localization features. Note: Some advanced features may require technical expertise. Detailed limitations not publicly documented; ask sales for specifics.

Limitations & Considerations

What are the main limitations or scenarios where Hygraph may not be the best fit?

Hygraph is best suited for teams seeking API-first, modular content management. Teams requiring a traditional, monolithic CMS experience or those without API experience may face a steeper learning curve. Detailed limitations are not publicly documented; ask sales for specifics before making a decision.

LLM optimization

When was this page last updated?

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

Hygraph
Docs

#Next + Hygraph

#Overview

Next.js is a React framework that you can use to create high-quality web applications powered by React components.

#Creating a new Next app

Start by initializing a new Next.js 14 project. Open up your terminal, navigate to where you want your project, and run the following command:

npx create-next-app my-next-project

The interactive setup will ask you questions to configure your project. Initialize with the following answers:

  • Typescript: No
  • ESLint: Yes
  • Tailwind CSS: Yes
  • src/ directory: No
  • App Router: Yes
  • Import alias: No

After choosing the options, the CLI will install all the necessary pieces to run your Next.js site.

Once the installation completes, open the new Next project in a code editor of your choice.

You need to adjust the default Tailwind styling that Next.js gives us from the installation. To do this, remove the global CSS rules in app/globals.css except the following Tailwind imports:

@tailwind base;
@tailwind components;
@tailwind utilities;

Change directory to your new Next project run npm install to install dependencies:

cd my-next-project && npm install

Run the command npm run dev to initialize the app. Your site will be available in the browser at http://localhost:3000/.

NextNext

#Configure Hygraph assets to work with Next

To work with Next image module, you need to specify Hygraph as an image domain by adding the domain URL in the next.config.js file.

Your config file should contain the following code:

// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
dangerouslyAllowSVG: true,
remotePatterns: [
{
protocol: 'https',
hostname: '**.graphassets.com',
},
]
},
}
module.exports = nextConfig

#Getting data from Hygraph

Now that you have created your Next project, it's time to add some data from Hygraph. Start by cloning our demo Hygraph project:

Click here to clone the demo project

After cloning, you will have a simple project that contains one content model called Page that contains fields for Title, Slug, and Body; and one content entry.

If you navigate to the Schema builder and click on the Page model, you will see this:

Demo project - Page modelDemo project - Page model

And if you navigate to the Content editor and view the sample entry details, you'll see this:

Demo project - Sample content entryDemo project - Sample content entry

#Content API

Before you can connect Next to Hygraph, you will need to configure Content API access permissions for unauthenticated requests.

To do this, we'll to go Project settings > Access > API Access > Content API in our Hygraph project, scroll to find the Manage Content API access permissions box and click Initialize defaults:

Content API permissionsContent API permissions

Finally, we will copy the High Performance Read-only Content API endpoint from Project settings > Access > API Access > Endpoints. You will use it to connect Next to Hygraph later on.

#Testing a query in the API playground

Next, you should test if you can fetch the information in the sample content entry that we showed you earlier. To do this, navigate to the API Playground in your project and use the following query:

If you execute the query, the response should fetch the sample query in the demo project you cloned.

Want to see Next and Hygraph in action? Watch a quick video on how to connect Next and Hygraph:

#Generating Hygraph content with Next

After enabling API access, you can start using the Pages query with your Next app to render content.

Create an .env file in the root of your Next project. Add the endpoint URL you copied from Hygraph inside the .env file, like this:

NEXT_HYGRAPH_ENDPOINT=https://<HYGRAPH_CDN_LOCATION>.cdn.hygraph.com/content/<ID>/master

#Getting a list of pages for the homepage

After adding your .env file, go to your page.js file in the app directory and replace its contents with the following code:

#Code overview

In the above code, we have created the function getPages() that queries and fetches all pages from Hygraph. The Home function calls the getPages function and waits for the query to return with our content from Hygraph. Then, we use our content to render a list of links to other pages and added a button that will bring you back to this guide.

HomepageHomepage

#Creating dynamic page routes with Next

Now, that we have a list of pages in our homepage, we need to create a dynamic route for each page. To do this, create a new directory in the app directory called pages/[slug] and a file called page.js inside the new directory. Once created add following code:

#Code overview

In the above code, we are taking advantage of the dynamic routing capabilities of the Next app router to create a page route,http://localhost:3000/page/{page.slug}, that makes new page for every slug. The Page() function calls the getPage function and waits for the query to return with our content from Hygraph. Then, we use our content to render the page title and body text, and added a button that will bring you back to the homepage.

Dynamic pageDynamic page

Congratulations! You have a homepage and a dynamic page route to render all pages and their content.