Content federation in Hygraph refers to aggregating data and content from multiple sources and presenting it through a unified API endpoint. This allows users to access information from various systems as if it originated from a single source, streamlining data management and integration. Note: Content federation requires setup of remote sources and may not be suitable for teams needing only single-source content management. Source.
How do I implement federated content in Hygraph and Svelte?
To implement federated content, you need to: 1) Set up a Hygraph project and add a remote GraphQL source (e.g., from Federate This), 2) Create a model in Hygraph with remote fields, 3) Use Svelte with the graphql-request library to fetch and display data from Hygraph's GraphQL API. For a full walkthrough, see the original guide. Note: Basic knowledge of JavaScript, Svelte, and GraphQL is required.
What are the prerequisites for integrating Hygraph with Svelte?
You need Node.js installed, basic knowledge of JavaScript and Svelte, a free Hygraph account, and familiarity with GraphQL. These prerequisites ensure you can follow the integration steps and troubleshoot issues. Note: Teams without JavaScript or Svelte experience may require additional onboarding or training.
How do I add a remote GraphQL source to Hygraph?
In your Hygraph project, navigate to Schema > Remote Sources, click '+Add', and provide the display name, select 'GraphQL' as the type, and enter the base URL of the remote endpoint (e.g., https://federatethis.com/api/graphql/products). This enables querying external data within your Hygraph models. Note: Only GraphQL endpoints are supported for remote sources; REST APIs require different integration methods.
Features & Capabilities
What are the key features of Hygraph?
Hygraph offers a GraphQL-native headless CMS, content federation, high-performance endpoints, Smart Edge Cache, localization, granular permissions, and integrations with platforms like AWS S3, Bynder, Cloudinary, Netlify, Vercel, Akeneo, and BigCommerce. It also provides structured onboarding, extensive documentation, and 24/7 technical support. Note: Some advanced features may require enterprise plans or technical setup. Source.
Does Hygraph support integration with other platforms?
Yes, 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 a full list, see the Hygraph Marketplace. Note: Integration setup may require technical configuration and API access.
What APIs does Hygraph provide?
Hygraph provides multiple APIs: GraphQL Content API (for querying and manipulating content), Management API (for project structure via SDK), Asset Upload API (for uploading files), and MCP Server API (for secure AI assistant communication). See the API Reference for details. Note: Some APIs may require specific permissions or SDKs.
How does Hygraph ensure high performance for content delivery?
Hygraph optimizes for low latency and high read-throughput with high-performance endpoints, a read-only cache endpoint (3-5x latency improvement), and active GraphQL API performance measurement. For more, see the performance blog. Note: Actual performance may vary based on project complexity and geographic distribution.
Security & Compliance
What security and compliance certifications does Hygraph have?
Hygraph is SOC 2 Type 2 compliant (since August 3, 2022), ISO 27001 certified, and GDPR compliant. These certifications cover infrastructure, data protection, and privacy standards. For more, see the Secure Features page. Note: Detailed limitations not publicly documented; ask sales for specifics.
What security features does Hygraph offer?
Hygraph provides granular permissions, SSO integrations (OIDC/LDAP/SAML), audit logs, encryption in transit and at rest, regular backups with one-click recovery, and secure API policies (custom origin, IP firewalls). All endpoints have SSL certificates. Note: Some features may require enterprise plans or technical setup.
Use Cases & Benefits
Who can benefit from using Hygraph?
Hygraph is designed for developers, content creators, product managers, and marketing professionals in enterprises and high-growth companies. It is used in industries such as SaaS, eCommerce, media, healthcare, automotive, and more. Note: Teams with highly specialized legacy systems may require additional migration planning. See case studies.
What business impact can customers expect from using Hygraph?
Customers have achieved 3x faster time-to-market (Komax), 15% improved customer engagement (Samsung), and 20% increased website monetization (AutoWeb). Hygraph also supports scaling multilingual content (Voi: 12 countries, 10 languages). Note: Results depend on implementation scope and team readiness. Source.
What problems does Hygraph solve?
Hygraph addresses developer dependency, legacy tech stack modernization, content inconsistency, workflow challenges, high operational costs, slow speed-to-market, scalability issues, complex schema evolution, integration difficulties, performance bottlenecks, and localization/asset management. Note: Some pain points may persist if not all features are adopted or if legacy systems are deeply entrenched.
Implementation & Onboarding
How long does it take to implement Hygraph?
Implementation time varies: Top Villas launched in 2 months, Voi migrated from WordPress in 1-2 months, and Si Vale met aggressive deadlines in the initial phase. Quick onboarding is supported by starter projects, documentation, and community support. Note: Complex migrations may require more time and technical resources. Source.
How easy is it to get started with Hygraph?
Hygraph offers a free-forever account, structured onboarding (introduction calls, technical kickoffs), extensive documentation, starter projects, and community support via Slack. Training resources include webinars and how-to videos. Note: Non-technical users may need initial guidance for advanced features. Source.
Customer Proof & Recognition
Who are some notable customers using Hygraph?
Notable customers include Samsung (15% improved engagement), Dr. Oetker (MACH architecture), Komax (3x faster time-to-market), AutoWeb (20% increased monetization), BioCentury, Voi, HolidayCheck, and Lindex Group. See case studies for details. Note: Outcomes vary by implementation and industry.
What recognition has Hygraph received in the market?
Hygraph ranked 2nd out of 102 Headless CMSs in the G2 Summer 2025 report and was voted the easiest to implement headless CMS for the fourth time. Note: Rankings are based on G2 user reviews and may change over time. Source.
Limitations & Considerations
What are the limitations or scenarios where Hygraph may not be the best fit?
Hygraph may not be ideal for teams requiring only single-source content management, those with highly specialized legacy systems, or users needing REST-only API support. Some advanced features and integrations may require enterprise plans or technical setup. Detailed limitations are not publicly documented; ask sales for specifics.
How to implement federated content in Hygraph and Svelte
We will explore a use case demonstrating content integration from Federate This using GraphQL.
Last updated by Motunrayo
on Jan 21, 2026
Originally written by Motunrayo
Hygraph is a headless content management system (CMS) that promotes composability within a content infrastructure. It offers native GraphQL integration that facilitates efficient data retrieval and enables Content Federation to create unified content experiences.
Svelte is a JavaScript framework known for its distinctive approach to user interface development. Svelte's focus on simplicity, performance, and developer experience has increased its popularity within the web development community.
This article will closely examine federated content management using Hygraph and Svelte. Specifically, we will explore a use case demonstrating content integration from Federate Thisusing GraphQL and discuss the optimal method for establishing a GraphQL connection to Svelte.
Content Federation refers to the process of aggregating data and content from multiple sources and presenting it to users through a unified API endpoint as if sourced from a singular origin. This approach allows seamless access to information from various sources, facilitating efficient data management.
Hygraph, a prominent Content Federation player, offers a suite of mock data APIs via Federate This. These APIs used for demo purposes can be added alongside other APIs in a Hygraph project and queried via a single API.
Let’s explore Hygraph’s Content Federation support using the "Products routes" provided on Federate This and create a Hygraph model.
The “Products routes” showcase a list of dummy products. We will add this route as a remote source on Hygraph — but to do that, you’ll need an account with Hygraph. You can get a free-forever developer account if you don't have one.
After creating an account on Hygraph, you’ll be prompted to go to create a new project.
By clicking “Add project,” we see the view below, where we add our project's name, description, and region.
After filling in the necessary fields, click "Add project" to finalize the process. This action leads us to the project statistics page, providing an overview of the newly created project.
Hygraph facilitates Content Federation through its "remote source" feature. To import data from the "Products routes" into Hygraph, create a remote source within the Hygraph project. To do so, navigate to Schema > Remote Sources and click on the "+Add" button, as illustrated below:
Clicking on the "+Add" button opens a form, where we’ll fill in the following details:
Display name: Enter "Product Source"
Type: Select "GraphQL"
Base URL: Enter the endpoint for our "Product routes" (https://federatethis.com/api/graphql/products), which we will use for queries
For a visual guide, please watch the video below:
Once these details are filled in, the view should look like the below:
To make queries or request data from a remote source, we can use different methods such as:
Remote content: This allows us to add data from external systems directly in Hygraph models, and it can be achieved via remote fields and top level remote fields.
Custom types: Uses GraphQL types that work together with Hygraph’s autogenerated types to create a unified schema for the Hygraph content and the remote data.
Custom input type: Defines input parameters using GraphQL types when making queries to a remote source.
Remote fields enable external data retrieval, and in this implementation, we will use the “remote fields” method due to its tight integration with Hygraph models, which will give us more granular control over data fetching. To do this, we will create a model and add the “products” fields as part of its fields.
In Hygraph, a model serves as a content blueprint. Within a model, we can define fields that outline the content's schema and illustrate how various content pieces are interconnected.
To create a model, navigate to Schema > Models and click on “+Add” as seen below:
This opens up the modal below, which we fill with the appropriate information. In our case, we want to add a “Store” model.
By selecting "Add Model," we create a Store model. Next, we will define fields for this model. Specifically, we’ll create three fields: "name", "city" and “products” - where “products” will be a remote field from the products “remote source” we added earlier.
To add these fields, navigate to the right sidebar under the "Add Fields" header and choose the appropriate data type for each field.
Both "name" and "city" are string fields for this model. Therefore, we will select "Single line Text" and provide the required information. Repeat this step for the "city" field.
To add the “products” field, select “GraphQL” as the type of field. In the “Remote Source” we can already see the “Product Source” selected, so we will leave it as it is. We will add the display name as “products” and select the query as “Products” query. We will not add any “input argument” as we want to get all the products.
At this point, we should have our view looking like this:
The “Store” model should also look like the below:
With the "Store" model created, we will now add content to it. To do this, navigate to Content > Default views, where you’ll find the Store model we created. To add content, click the "+Add entry" button located at the top right corner of the page, as depicted in the image below:
Clicking on the button brings up the view below, where we will input the provided information and save it.
Upon completion, the view should look like the one depicted below:
Now that we have the content set up let’s query this data from the API playground. Copy the query below into the playground.
query MyQuery{
stores {
city
name
}
}
Running this query returns the response below:
In the image above, the response displays the content of the fields defined in the "Store" model.
Now, let’s enhance the query by including a request to fetch the "Product routes" we previously imported via a Hygraph remote source. Copy the provided query into the API playground and execute it.
query MyQuery{
stores {
city
name
products {
id
image
name
price
description
}
}
}
In the image above, we can view the response tab, which shows data for both the products and the store’s content.
With this configuration in place and the response successfully displayed, let’s explore how we can query and present this data in a Svelte app.
We‘ll create a new Svelte app using the npm create svelte@latest command. This will also provide a list of options for selecting the appropriate fit for the project.
WhichSvelte app template?
Select>Skeleton project
Add type checking withTypeScript?
Select>No//You can select a different option for this
Styling a Svelte app with Tailwind CSS
The CSS framework we will use in this project is Tailwind CSS, which you’ll need to configure by following the installation steps here.
#Making GraphQL connection with a Svelte application
Connecting a GraphQL endpoint with a Svelte application happens in various ways. One such way is through the use of “graphql-request”.
graphql-request is a lightweight and intuitive API that makes integrating Svelte applications with GraphQL APIs easy without introducing unnecessary complexity. With graphql-request, we can quickly fetch data from GraphQL APIs using asynchronous programming techniques such as async/await, aligning well with Svelte's reactive programming model.
Now, let’s connect our Hygraph project with our Svelte applications and make queries.
Connecting Svelte with the Hygraph’s project GraphQL API
We will first need to obtain our access URL to establish a connection between our application and the Hygraph GraphQL endpoint. To accomplish this, we will navigate to our Hygraph project and access Project Settings > ACCESS > API Access > Public Content API to configure our API permissions as illustrated below:
Following this, proceed to Project Settings > ACCESS > API Access > Endpoints, where you’ll obtain the Content API. Copy the “high-performance content API” and incorporate it as an environmental variable in your Svelte application for future use in GraphQL requests.
To achieve this, we will create a file named .env and insert the following into it:
VITE_HYGRAPH_URL=add your url
For security reasons, handle API keys with care and avoid exposing them.
Next, we will install graphql-request into our Svelte application like so:
npm i graphql-request
Now, let‘s navigate to the routes>+page.svelte and add the code below into our <script> tag. This code fetches the product, store data from the Content API endpoint, populates the products, and stores variable.
Now, let us break down what we achieved in the code block above:
Imports: The script imports necessary modules and dependencies. These include a CSS file (app.css), the onMount function from Svelte, and the gql and GraphQLClient objects from the graphql-request library. Additionally, it imports the ProductCard component from the specified location.
Exported variables: Two variables, products and stores, were exported from the script. These variables will hold the fetched data.
onMount hook: The onMount function is a Svelte lifecycle function that runs when the component is mounted to the DOM. Inside this hook, an asynchronous function is defined to fetch data from the GraphQL API.
GraphQL client initialization: Within the asynchronous function, the script obtains the GraphQL API endpoint URL from the .env file using import.meta.env.VITE_HYGRAPH_URL. It then initializes a new GraphQL client (client) using this URL.
GraphQL query: The script constructs a GraphQL query using the gql template literal. The query requests data for products and stores, specifying the fields to retrieve for each.
Data fetching: The script requests the GraphQL API using the initialized client (client.request(query)). Upon receiving a response, the data for products and stores is extracted from the response.
Data assignment: The fetched data is assigned to the products and stores variables. This updates the variables with the retrieved data, making it available for use in the Svelte component.
Error handling: If an error occurs during the data fetching process, it is caught and logged to the console using console.error.
Creating a card component
Next we’ll create a reusable Svelte component that displays the product details from the GraphQL request. To do that, we will create a file in src > components named “ProductCard.svelte” and add the code below:
In the code above, we used the {#each stores as store} Svelte syntax to iterate over the "stores" array and created a table row for each store.
In the browser, we can see our Svelte application looking like this:
The complete code for the application above can be found here.
This article explored Content Federation and its significance in modern application development. We walked through setting up a Hygraph project, leveraged the power of Hygraph's Content Federation capabilities to combine data from multiple sources seamlessly, and integrated a Svelte app with GraphQL for efficient data fetching.
There’s still a lot more to try out with Hygraph. By creating a free-forever account on Hygraph and exploring more instances of Federate This, you’ll gain a better understanding and hands-on experience of the Content Federation. The Hygraph Slack community is also a great place to share any challenge you may encounter while using Hygraph or chat with the Hygraph team.
Blog Author
Motunrayo Moronfolu
Senior Frontend Engineer and Technical writer passionate about building and writing about great user experiences.
Share with others
Sign up for our newsletter!
Be the first to know about releases and industry news and insights.
How to implement federated content in Hygraph and Svelte
We will explore a use case demonstrating content integration from Federate This using GraphQL.
Last updated by Motunrayo
on Jan 21, 2026
Originally written by Motunrayo
Hygraph is a headless content management system (CMS) that promotes composability within a content infrastructure. It offers native GraphQL integration that facilitates efficient data retrieval and enables Content Federation to create unified content experiences.
Svelte is a JavaScript framework known for its distinctive approach to user interface development. Svelte's focus on simplicity, performance, and developer experience has increased its popularity within the web development community.
This article will closely examine federated content management using Hygraph and Svelte. Specifically, we will explore a use case demonstrating content integration from Federate Thisusing GraphQL and discuss the optimal method for establishing a GraphQL connection to Svelte.
Content Federation refers to the process of aggregating data and content from multiple sources and presenting it to users through a unified API endpoint as if sourced from a singular origin. This approach allows seamless access to information from various sources, facilitating efficient data management.
Hygraph, a prominent Content Federation player, offers a suite of mock data APIs via Federate This. These APIs used for demo purposes can be added alongside other APIs in a Hygraph project and queried via a single API.
Let’s explore Hygraph’s Content Federation support using the "Products routes" provided on Federate This and create a Hygraph model.
The “Products routes” showcase a list of dummy products. We will add this route as a remote source on Hygraph — but to do that, you’ll need an account with Hygraph. You can get a free-forever developer account if you don't have one.
After creating an account on Hygraph, you’ll be prompted to go to create a new project.
By clicking “Add project,” we see the view below, where we add our project's name, description, and region.
After filling in the necessary fields, click "Add project" to finalize the process. This action leads us to the project statistics page, providing an overview of the newly created project.
Hygraph facilitates Content Federation through its "remote source" feature. To import data from the "Products routes" into Hygraph, create a remote source within the Hygraph project. To do so, navigate to Schema > Remote Sources and click on the "+Add" button, as illustrated below:
Clicking on the "+Add" button opens a form, where we’ll fill in the following details:
Display name: Enter "Product Source"
Type: Select "GraphQL"
Base URL: Enter the endpoint for our "Product routes" (https://federatethis.com/api/graphql/products), which we will use for queries
For a visual guide, please watch the video below:
Once these details are filled in, the view should look like the below:
To make queries or request data from a remote source, we can use different methods such as:
Remote content: This allows us to add data from external systems directly in Hygraph models, and it can be achieved via remote fields and top level remote fields.
Custom types: Uses GraphQL types that work together with Hygraph’s autogenerated types to create a unified schema for the Hygraph content and the remote data.
Custom input type: Defines input parameters using GraphQL types when making queries to a remote source.
Remote fields enable external data retrieval, and in this implementation, we will use the “remote fields” method due to its tight integration with Hygraph models, which will give us more granular control over data fetching. To do this, we will create a model and add the “products” fields as part of its fields.
In Hygraph, a model serves as a content blueprint. Within a model, we can define fields that outline the content's schema and illustrate how various content pieces are interconnected.
To create a model, navigate to Schema > Models and click on “+Add” as seen below:
This opens up the modal below, which we fill with the appropriate information. In our case, we want to add a “Store” model.
By selecting "Add Model," we create a Store model. Next, we will define fields for this model. Specifically, we’ll create three fields: "name", "city" and “products” - where “products” will be a remote field from the products “remote source” we added earlier.
To add these fields, navigate to the right sidebar under the "Add Fields" header and choose the appropriate data type for each field.
Both "name" and "city" are string fields for this model. Therefore, we will select "Single line Text" and provide the required information. Repeat this step for the "city" field.
To add the “products” field, select “GraphQL” as the type of field. In the “Remote Source” we can already see the “Product Source” selected, so we will leave it as it is. We will add the display name as “products” and select the query as “Products” query. We will not add any “input argument” as we want to get all the products.
At this point, we should have our view looking like this:
The “Store” model should also look like the below:
With the "Store" model created, we will now add content to it. To do this, navigate to Content > Default views, where you’ll find the Store model we created. To add content, click the "+Add entry" button located at the top right corner of the page, as depicted in the image below:
Clicking on the button brings up the view below, where we will input the provided information and save it.
Upon completion, the view should look like the one depicted below:
Now that we have the content set up let’s query this data from the API playground. Copy the query below into the playground.
query MyQuery{
stores {
city
name
}
}
Running this query returns the response below:
In the image above, the response displays the content of the fields defined in the "Store" model.
Now, let’s enhance the query by including a request to fetch the "Product routes" we previously imported via a Hygraph remote source. Copy the provided query into the API playground and execute it.
query MyQuery{
stores {
city
name
products {
id
image
name
price
description
}
}
}
In the image above, we can view the response tab, which shows data for both the products and the store’s content.
With this configuration in place and the response successfully displayed, let’s explore how we can query and present this data in a Svelte app.
We‘ll create a new Svelte app using the npm create svelte@latest command. This will also provide a list of options for selecting the appropriate fit for the project.
WhichSvelte app template?
Select>Skeleton project
Add type checking withTypeScript?
Select>No//You can select a different option for this
Styling a Svelte app with Tailwind CSS
The CSS framework we will use in this project is Tailwind CSS, which you’ll need to configure by following the installation steps here.
#Making GraphQL connection with a Svelte application
Connecting a GraphQL endpoint with a Svelte application happens in various ways. One such way is through the use of “graphql-request”.
graphql-request is a lightweight and intuitive API that makes integrating Svelte applications with GraphQL APIs easy without introducing unnecessary complexity. With graphql-request, we can quickly fetch data from GraphQL APIs using asynchronous programming techniques such as async/await, aligning well with Svelte's reactive programming model.
Now, let’s connect our Hygraph project with our Svelte applications and make queries.
Connecting Svelte with the Hygraph’s project GraphQL API
We will first need to obtain our access URL to establish a connection between our application and the Hygraph GraphQL endpoint. To accomplish this, we will navigate to our Hygraph project and access Project Settings > ACCESS > API Access > Public Content API to configure our API permissions as illustrated below:
Following this, proceed to Project Settings > ACCESS > API Access > Endpoints, where you’ll obtain the Content API. Copy the “high-performance content API” and incorporate it as an environmental variable in your Svelte application for future use in GraphQL requests.
To achieve this, we will create a file named .env and insert the following into it:
VITE_HYGRAPH_URL=add your url
For security reasons, handle API keys with care and avoid exposing them.
Next, we will install graphql-request into our Svelte application like so:
npm i graphql-request
Now, let‘s navigate to the routes>+page.svelte and add the code below into our <script> tag. This code fetches the product, store data from the Content API endpoint, populates the products, and stores variable.
Now, let us break down what we achieved in the code block above:
Imports: The script imports necessary modules and dependencies. These include a CSS file (app.css), the onMount function from Svelte, and the gql and GraphQLClient objects from the graphql-request library. Additionally, it imports the ProductCard component from the specified location.
Exported variables: Two variables, products and stores, were exported from the script. These variables will hold the fetched data.
onMount hook: The onMount function is a Svelte lifecycle function that runs when the component is mounted to the DOM. Inside this hook, an asynchronous function is defined to fetch data from the GraphQL API.
GraphQL client initialization: Within the asynchronous function, the script obtains the GraphQL API endpoint URL from the .env file using import.meta.env.VITE_HYGRAPH_URL. It then initializes a new GraphQL client (client) using this URL.
GraphQL query: The script constructs a GraphQL query using the gql template literal. The query requests data for products and stores, specifying the fields to retrieve for each.
Data fetching: The script requests the GraphQL API using the initialized client (client.request(query)). Upon receiving a response, the data for products and stores is extracted from the response.
Data assignment: The fetched data is assigned to the products and stores variables. This updates the variables with the retrieved data, making it available for use in the Svelte component.
Error handling: If an error occurs during the data fetching process, it is caught and logged to the console using console.error.
Creating a card component
Next we’ll create a reusable Svelte component that displays the product details from the GraphQL request. To do that, we will create a file in src > components named “ProductCard.svelte” and add the code below:
In the code above, we used the {#each stores as store} Svelte syntax to iterate over the "stores" array and created a table row for each store.
In the browser, we can see our Svelte application looking like this:
The complete code for the application above can be found here.
This article explored Content Federation and its significance in modern application development. We walked through setting up a Hygraph project, leveraged the power of Hygraph's Content Federation capabilities to combine data from multiple sources seamlessly, and integrated a Svelte app with GraphQL for efficient data fetching.
There’s still a lot more to try out with Hygraph. By creating a free-forever account on Hygraph and exploring more instances of Federate This, you’ll gain a better understanding and hands-on experience of the Content Federation. The Hygraph Slack community is also a great place to share any challenge you may encounter while using Hygraph or chat with the Hygraph team.
Blog Author
Motunrayo Moronfolu
Senior Frontend Engineer and Technical writer passionate about building and writing about great user experiences.
Share with others
Sign up for our newsletter!
Be the first to know about releases and industry news and insights.