Frequently Asked Questions

Technical Setup & Developer Experience

How do I set up a SvelteKit project with Hygraph and Houdini?

To set up a SvelteKit project with Hygraph and Houdini, initialize your SvelteKit app using pnpm init svelte@next hygraph-with-houdini, install dependencies, and add Houdini as a dev dependency. Then, bootstrap Houdini with npx houdini init and configure your svelte.config.js to include Houdini preprocess. For detailed steps, refer to the original blog post.

What is Houdini and how does it work with Hygraph?

Houdini is a GraphQL client designed to reduce boilerplate code for GraphQL queries in SvelteKit projects. It offers features like composable data requirements, normalized cache, generated types, subscriptions, and pagination. When used with Hygraph, Houdini simplifies querying and managing content via GraphQL APIs. Learn more in the Houdini documentation.

How do I fetch data from Hygraph using Houdini?

You can fetch data from Hygraph by defining GraphQL queries in your SvelteKit project and using Houdini's query function. For example, to fetch all posts, use a query like query AllPosts { posts { title, slug, date, excerpt, tags, coverImage { url } } }. Houdini manages the query execution and data subscription. See the blog section for code samples.

How do I handle custom scalar types like Date in Houdini?

To handle custom scalar types such as Date, configure your houdini.config.js to define how to marshal and unmarshal the type. For example, set the type to 'Date', and provide functions to convert API responses and inputs. Refer to the Houdini GitHub issues for examples.

How do I use query variables with Houdini and Hygraph?

To use query variables, define a function named Variables that returns the required parameters (e.g., slug) for your query. Houdini replaces SvelteKit's load function with this approach, allowing you to pass dynamic values to your GraphQL queries. See the blog section for implementation details.

How do I display blog posts from Hygraph in SvelteKit?

After fetching posts using Houdini, use Svelte's {#each} directive to loop through the posts and display their details (title, excerpt, cover image, tags) on your page. For code samples, refer to the blog section.

How do I create dynamic routes for individual posts in SvelteKit?

Create a [slug].svelte file in your src/routes/posts directory. Use Houdini to fetch the post data based on the slug parameter from the URL. This enables dynamic rendering of individual blog posts. See the blog section for details.

What are the benefits of using Houdini with Hygraph?

Using Houdini with Hygraph reduces boilerplate code, streamlines GraphQL queries, and provides features like normalized caching, generated types, and subscriptions. This improves developer productivity and enables efficient content management in SvelteKit projects. Source: Blog.

Can I use Tailwind CSS with Hygraph and Houdini in SvelteKit?

Yes, you can add Tailwind CSS to your SvelteKit project by running npx svelte-add@latest tailwindcss. This allows you to style your Hygraph-powered blog with Tailwind classes. Source: Blog.

How do I manage scripts for Houdini in my SvelteKit project?

Add Houdini commands to your package.json scripts to automate file generation. For example, use npx houdini generate && svelte-kit dev for development and npx houdini generate && svelte-kit build for production builds. Source: Blog.

How do I display author information for blog posts from Hygraph?

Fetch author details (name, title, picture) in your GraphQL query and display them in your SvelteKit component. Use Svelte's data binding to render the author's information alongside the post content. Source: Blog.

How do I validate that my GraphQL queries are working in SvelteKit?

Display the returned data using <pre>{JSON.stringify(data, null, 2)}</pre> in your SvelteKit component to quickly validate the output from your GraphQL queries. Source: Blog.

What is the recommended way to organize SvelteKit routes for a Hygraph blog?

Organize your routes by creating a posts directory and a dynamic [slug].svelte file for individual post pages. This structure supports dynamic routing and clean URL management. Source: Blog.

How do I use Svelte stores with Houdini data?

Houdini returns data as Svelte stores, allowing you to subscribe to changes using the $ prefix (e.g., $data). This enables reactive updates in your SvelteKit components. Source: Blog.

How do I add visual editing capabilities to my Hygraph project?

Hygraph offers visual editing features such as 'Click to Edit', allowing users to edit content directly in the UI. For more information, see the Click to Edit announcement.

Where can I find more tutorials and resources for Hygraph?

You can find additional tutorials, developer guides, and resources on the Hygraph Blog and Documentation pages.

How do I subscribe to Hygraph updates and news?

Sign up for the Hygraph newsletter to receive updates on releases, industry news, and insights. The subscription form is available on the blog page.

What frameworks are supported by Hygraph?

Hygraph supports integration with modern frameworks such as SvelteKit, Nuxt.js, and more. For a full list, visit the Frameworks page.

How do I contact Hygraph support?

You can contact Hygraph support via the Support page or join the community Slack channel for quick assistance.

Where can I find the Hygraph API status?

The current status of Hygraph APIs is available on the API Status page.

Features & Capabilities

What features does Hygraph offer?

Hygraph provides a GraphQL-native architecture, content federation, scalability, enterprise-grade security, user-friendly tools, Smart Edge Cache, localization, asset management, and cost efficiency. These features enable businesses to deliver exceptional digital experiences. Source: Features page.

Does Hygraph support high-performance endpoints?

Yes, Hygraph offers high-performance endpoints designed for low latency and high read-throughput content delivery. For more details, see the blog post.

What APIs does Hygraph provide?

Hygraph offers multiple APIs: Content API, High Performance Content API, MCP Server API, Asset Upload API, and Management API. Each serves different use cases for content querying, asset management, and project structure. See the API Reference Documentation for details.

What integrations are available with Hygraph?

Hygraph integrates with Digital Asset Management systems (Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), Adminix, Plasmic, and supports custom integrations via SDKs and APIs. Explore more in the Integrations Documentation.

Does Hygraph provide technical documentation?

Yes, Hygraph offers extensive technical documentation covering APIs, schema components, references, webhooks, and AI integrations. Access all resources at the Documentation page.

How does Hygraph measure and optimize API performance?

Hygraph actively measures the performance of its GraphQL APIs and provides practical advice for optimization in resources like the GraphQL Survey 2024 and GraphQL Report 2024.

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 robust security and data protection. Source: Secure features page.

What enterprise-grade security features does Hygraph offer?

Hygraph provides granular permissions, audit logs, SSO integrations, encryption at rest and in transit, regular backups, and dedicated hosting options. These features support enterprise security and governance. Source: Secure features page.

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 features and limits. For details, visit the Pricing page.

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. Sign up here.

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. Get started here.

What features are included in the Enterprise plan?

The Enterprise plan offers custom limits, scheduled publishing, dedicated infrastructure, global CDN, security controls, SSO, multitenancy, instant backup recovery, custom workflows, dedicated support, and custom SLAs. Try for 30 days or request a demo.

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: Case studies.

What industries use Hygraph?

Industries represented in Hygraph's case studies include SaaS, marketplace, education technology, media, healthcare, consumer goods, automotive, technology, fintech, travel, food & beverage, eCommerce, agency, gaming, events, government, electronics, engineering, and construction. See case studies for examples.

What business impact can customers expect from 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: Case studies.

Can you share specific customer success stories?

Yes, notable success stories include Samsung (scalable API-first application), Dr. Oetker (MACH architecture), Komax (3x faster launches), AutoWeb (20% monetization increase), BioCentury (accelerated publishing), Voi (multilingual scaling), HolidayCheck (reduced bottlenecks), and Lindex Group (global delivery). See case studies for details.

Who are some of Hygraph's customers?

Hygraph's customers include Samsung, Dr. Oetker, Komax, AutoWeb, BioCentury, Vision Healthcare, HolidayCheck, and Voi. For more, visit the case studies page.

Pain Points & Solutions

What problems does Hygraph solve?

Hygraph solves operational inefficiencies (developer dependency, legacy tech stacks, content inconsistency), financial challenges (high costs, slow speed-to-market, scalability), and technical issues (schema evolution, integration, performance bottlenecks, localization, asset management). Source: Case studies.

How does Hygraph address developer dependency?

Hygraph provides an intuitive interface for non-technical users, enabling independent content management and reducing bottlenecks. HolidayCheck's case study highlights reduced developer bottlenecks. Source: HolidayCheck case study.

How does Hygraph help with schema evolution?

Hygraph's GraphQL-native architecture simplifies schema changes and reduces boilerplate code, making it easier for developers to adapt and evolve content models. Source: Blog.

How does Hygraph improve integration with third-party systems?

Hygraph offers robust GraphQL APIs and content federation, enabling seamless integration with third-party systems and multiple endpoints. Source: Integrations Documentation.

How does Hygraph optimize performance and content delivery?

Hygraph uses Smart Edge Cache and high-performance endpoints to address cache issues and ensure fast content delivery, improving user experience for high-traffic and global audiences. Source: Blog post.

How does Hygraph support localization and asset management?

Hygraph provides advanced localization and asset management features, making it ideal for global teams managing multilingual content and digital assets. Source: Integrations Documentation.

Competition & Comparison

How does Hygraph compare to traditional CMS platforms?

Hygraph is the first GraphQL-native Headless CMS, offering simplified schema evolution, content federation, and modern workflows. Unlike traditional CMS platforms that rely on REST APIs and developer intervention, Hygraph enables seamless integration and independent content management. Source: Case studies.

Why choose Hygraph over alternatives?

Hygraph stands out for its GraphQL-native architecture, content federation, enterprise-grade features, user-friendly tools, scalability, proven ROI, and market recognition (ranked 2nd out of 102 Headless CMSs in G2 Summer 2025). Source: Case studies, G2 Summer 2025 report.

How does Hygraph differentiate itself in solving pain points?

Hygraph offers a user-friendly interface, GraphQL-native architecture, content federation, cost efficiency, accelerated speed-to-market, robust APIs, Smart Edge Cache, and enhanced localization. These features address operational, financial, and technical challenges more effectively than competitors. Source: Case studies.

Support & Implementation

How long does it take to implement Hygraph?

Implementation time varies by project. For example, Top Villas launched a new project in just 2 months, and Si Vale met aggressive deadlines with smooth onboarding. Source: Top Villas case study, Si Vale case study.

How easy is it to start using Hygraph?

Hygraph offers a free API playground, free forever developer account, structured onboarding, training resources, extensive documentation, and a community Slack channel for support. These resources make it easy to start and maximize value. Source: Documentation.

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

Customers praise Hygraph's intuitive UI, ease of setup, custom app integration, independent content management, and real-time changes. Some users note complexity for less technical users. Source: Try Headless CMS page, Enterprise page.

Introducing Click to Edit

Working with Houdini and Hygraph

In this example, Scott Spence shows how to use Houdini, the disappearing GraphQL client, with your Hygraph and SvelteKit project.
Scott Spence

Written by Scott 

Jan 31, 2022
Working with hygraph, Houdini, Sapper, and GraphQL

Houdini: the disappearing GraphQL client!

In this post, we'll be taking a look at Houdini and how you could use it in your Hygraph projects.

Houdini was created to reduce the amount of boilerplate code needed to make GraphQL queries to an API. This reduces the overhead needed for building a SvelteKit project that uses GraphQL. We'll go into detail on this shortly, but first, let's take a look at some of the features you get with Houdini.

  • Composable and co-located data requirements for your components
  • Normalized cache with declarative updates
  • Generated types
  • Subscriptions
  • Support for SvelteKit and Sapper
  • Pagination (cursors and offsets)

(Feature list taken from the Houdini documentation)

#Getting set up!

We'll be using the Hygraph starter blog template to get started here. You can quickly spin up this template from your Hygraph dashboard.

In these examples, I'll be using pnpm you can use npm or yarn if you prefer.

# create new svelte project named hygraph-with-houdini
pnpm init svelte@next hygraph-with-houdini
# change directory into the newly created project
cd hygraph-with-houdini
# install dependencies
pnpm install
# optional init git repo
git init && git add -A && git commit -m "Initial commit" (optional)

From the SvelteKit CLI options I'll be choosing:

Which Svelte app template? › Skeleton project
Use TypeScript? › No
Add ESLint for code linting? › No
Add Prettier for code formatting? › Yes

With the project initialized, I can add in the dependencies for Houdini as dev dependencies -D.

pnpm i -D houdini houdini-preprocess

Now that's installed, I can bootstrap the project with the Houdini init command.

npx houdini init

Here's where I'll be prompted for the project API, you can check out the video here for how to get that:

I'll paste in the content API URL and hit enter, I'll choose SvelteKit from the CLI prompt and I'll accept the default (./schema.graphql) for where the schema should be written to.

Svelte Configuration

There's a couple of options I'll need to add into the svelte.config.js file now so Vite (the tool used to build Svelte) can use Houdini in the project.

Here's what my svelte.config.js file looks like:

import adapter from '@sveltejs/adapter-auto'
import houdini from 'houdini-preprocess'
import path from 'path'
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: [houdini()],
kit: {
adapter: adapter(),
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',
vite: {
resolve: {
alias: {
$houdini: path.resolve('.', '$houdini'),
},
},
server: {
fs: {
// Allow serving files from one level up to the project root
// https://vitejs.dev/config/#server-fs-allow
allow: ['..'],
},
},
},
},
}
export default config

Add Houdini Client

Now to have the Houdini client available to the project, I'll need to add this to somewhere where it will be available to the whole project. The SvelteKit __layout file is a good place to add this.

I'll need to create the layout file, I'll do that with this bash one-liner:

touch src/routes/__layout.svelte

In the newly created __layout.svelte file, I'll add the following:

<script context="module">
import { setEnvironment } from '$houdini'
import environment from '../environment'
setEnvironment(environment)
</script>
<slot />

Optional styling

I will just focus on how to use Houdini here, so I'll skip the styling. If you want to use Tailwind classes in the project, you can use the following to initialise the project to use Tailwind:

npx svelte-add@latest tailwindcss

#Fetch the Hygraph API Data

I'm going to define the first GraphQL query for use in the project. This is the standard information you'd want to display on a blog landing page.

I'll pop in a <pre> tag with the posts object returned from the Houdini query so I can see the data on the page as a quick way to validate it's working.

<script>
import { graphql, query } from '$houdini'
const { data } = query(graphql`
query AllPosts {
posts {
title
slug
date
excerpt
tags
coverImage {
url(transformation: { image: { resize: { width: 400, height: 400, fit: clip } } })
}
}
}
`)
const { posts } = $data
</script>
<pre>{JSON.stringify(posts, null, 2)}</pre>

You may have noticed the $ on the data object, this is a Svelte store and the $ is how I can subscribe to it.

Now for Houdini to know about that query, I'll need to run the Houdini generate command:

npx houdini generate

This will throw an error, because Houdini needs to know how to handle the Date type:

npx houdini generate
AllPosts
Error: Could not convert scalar type: Date

There's a couple of issues on the Houdini GitHub repo detailing how to create a custom scalar type.

Here's what my houdini.config.js looks like now with the custom scalar added:

/** @type {import('houdini').ConfigFile} */
const config = {
schemaPath: './schema.graphql',
sourceGlob: 'src/**/*.svelte',
module: 'esm',
framework: 'kit',
scalars: {
// the name of the scalar we are configuring
Date: {
// the corresponding typescript type (what the typedef generator leaves behind in the response and operation inputs)
type: 'Date',
// turn the api's response into that type
unmarshal(val) {
const date = new Date(val).toISOString()
return date
},
// turn the value into something the API can use
marshal(date) {
return date.getTime()
},
},
},
}
export default config

If I try the Houdini generate command again, I'll get the following output:

npx houdini generate
AllPosts

Looks like there no issues there now!

As a side note here, I'll be adding in some more queries while building out this example, so what I'll do is add the npx houdini generate command to the project scripts.

This is so that I don't have to stop the dev server each time I add a new query to have Houdini generate the files needed.

Here's what the scripts look like in my package.json file now:

"scripts": {
"dev": "npx houdini generate && svelte-kit dev",
"build": "npx houdini generate && svelte-kit build",
"package": "svelte-kit package",
"preview": "npx houdini generate && svelte-kit preview",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. .",
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
},

Ok, I'll run the dev script again now and check localhost:3000 in my browser to see the data I've added.

On the browser page, I get the following JSON data back from the Houdini query:

[
{
"title": "Technical SEO with Hygraph",
"slug": "technical-seo-with-hygraph",
"date": "2020-05-05T00:00:00.000Z",
"excerpt": "Get started with your SEO implementation when using a Headless CMS",
"tags": ["SEO"],
"coverImage": {
"url": "https://eu-central-1-shared-euc1-02.graphassets.com/AvHQ3RDvFSousA8iwElOKz/resize=fit:clip,height:400,width:400/Ey8F3QcRzKVWqn9W7Pl7",
"id": "ckhz8xs9k1sv60952ql0sflru"
},
"id": "ckadrcx4g00pw01525c5d2e56"
},
{
"title": "Union Types and Sortable Relations with Hygraph",
"slug": "union-types-and-sortable-relations",
"date": "2020-05-01T00:00:00.000Z",
"excerpt": "Learn more about Polymorphic Relations and Sortable Relations with Hygraph",
"tags": ["Union Types"],
"coverImage": {
"url": "https://eu-central-1-shared-euc1-02.graphassets.com/AvHQ3RDvFSousA8iwElOKz/resize=fit:clip,height:400,width:400/OUT7id5vT2XOaLEMAspU",
"id": "ckhz8z76w1rpy0a53x96s7wkd"
},
"id": "ckadrfuu000pe0148kels2b5e"
}
]

Now I have everything I need to build out the landing page.

#Add Page Markup

After the <script> tags, I'll use the Svelte Head API to give the page a title.

Some introductory text to explain what the page is about.

Then I'll use the Svelte {#each} directive to loop through the posts and display them on the page.

Here's what the file looks like now:

<script>
import { graphql, query } from '$houdini'
const { data } = query(graphql`
query AllPosts {
posts {
title
slug
date
excerpt
tags
coverImage {
url(
transformation: {
image: {
resize: { width: 400, height: 400, fit: clip }
}
}
)
}
}
}
`)
const { posts } = $data
</script>
<svelte:head>
<title>Houdini with Hygraph | Welcome</title>
</svelte:head>
<h1>Houdini with Hygraph</h1>
<p>
An example project using the Hygraph blog template and Houdini for
the GraphQL client
</p>
{#each posts as { title, slug, excerpt, coverImage, tags }}
<div>
<figure>
<img src={coverImage.url} alt={`Cover image for ${title}`} />
</figure>
<div>
<h2>{title}</h2>
<p>{excerpt}</p>
<div>
{#each tags as tag}
<span>{tag}</span>
{/each}
</div>
<div>
<a sveltekit:prefetch href={`/posts/${slug}`}>
Read &rArr;
</a>
</div>
</div>
</div>
{/each}

Now that the landing page information is on there, I have a list of clickable links to take me to the post for more detail.

That route doesn't exist yet so I'll create that now, again with a terminal command:

# make the posts directory
mkdir src/routes/posts
# make the [slug].svelte file
touch src/routes/posts/'[slug]'.svelte

Now I'll need a way to get the slug from the URL into the PostQuery in the src/routes/posts/[slug].svelte file.

#Using Query Variables

So the query for the post page will need to take a query parameter (slug) and use that to get the post.

The query will look something like this, I've taken out the author and cover image fields for brevity:

query PostQuery($slug: String!) {
post(where: { slug: $slug }) {
title
date
tags
content {
html
}
}
}

I can use that query much the same way I did it on the index page, following the same pattern.

<script>
import { graphql, query } from '$houdini'
const { data } = query(
graphql`
query PostQuery($slug: String!) {
post(where: { slug: $slug }) {
title
date
tags
# author
content {
html
}
# coverImage
}
}
`
)
const { post } = $data
</script>
<pre>{JSON.stringify(post, null, 2)}</pre>

Here's where things get a bit specific to Houdini, as Houdini replaces the load function in SvelteKit with a Variables function. It takes the same arguments as the load function, so this is where I can destructure out the params object to get the slug that can be used in the query.

I'll add this to the top of the file:

<script context="module">
export const PostQueryVariables = ({ params }) => {
const { slug } = params
return {
slug,
}
}
</script>

One thing to note is that the Variables function will take on the name of the query defined, so on this file the query is PostQuery so the load function for the page needs to be PostQueryVariables.

#Add [slug] Page Markup

Now, I can add in the markup needed to display the post.

Here's what my src/routes/posts/[slug].svelte file looks like now:

<script context="module">
export const PostQueryVariables = ({ params }) => {
const { slug } = params
return {
slug,
}
}
</script>
<script>
import { graphql, query } from '$houdini'
const { data } = query(
graphql`
query PostQuery($slug: String!) {
post(where: { slug: $slug }) {
title
date
tags
author {
name
authorTitle: title
picture {
url(transformation: { image: { resize: { fit: clip, height: 50, width: 50 } } })
}
}
content {
html
}
coverImage {
url
}
}
}
`
)
const { post } = $data
const {
title,
coverImage,
author: { picture, name, authorTitle },
date,
tags,
content: { html },
} = post
</script>
<svelte:head>
<title>Houdini with Hygraph | {title}</title>
</svelte:head>
<img src="{coverImage.url}" alt="{`Cover" image for ${title}`} />
<h1>{title}</h1>
<a href="/" class="inline-flex items-center mb-3">
<img src="{picture.url}" alt="{name}" />
<span>{name}</span>
<span>{authorTitle}</span>
</a>
<p>{new Date(date).toDateString()}</p>
{#if tags} {#each tags as tag}
<span>{tag}</span>
{/each} {/if}
<article>{@html html}</article>

#Fin

That's it! I've created a simple blog template using Hygraph and Houdini.

I hope you found it useful.

Blog Author

Scott Spence

Scott Spence

Developer Advocate @Hygraph • Learner of things • Jamstack • Svelte

Share with others

Sign up for our newsletter!

Be the first to know about releases and industry news and insights.