Frequently Asked Questions

Federation Approaches & Technical Comparison

What is GraphQL Mesh and when should I use it?

GraphQL Mesh is a framework that allows you to create an executable GraphQL schema from multiple data sources, including REST APIs, OpenAPI/Swagger, gRPC, databases, and other GraphQL services. It enables you to aggregate data from these sources into a single schema without tightly coupling your services. Use GraphQL Mesh when you need to combine diverse APIs and want flexibility in customizing and transforming your schema. Note: GraphQL Mesh has a moderate learning curve and may not be ideal if you require a centralized gateway or need to restrict data access for non-developer users. Source.

What is Apollo Federation and how does it work?

Apollo Federation is a framework for composing a federated schema by combining independent, self-contained GraphQL services (subgraphs). Each service manages its own schema and can be developed and deployed independently. A centralized gateway (Apollo Gateway) composes these subgraphs into a supergraph, allowing clients to fetch data from all services with a single request. Apollo Federation is suitable for organizations with multiple teams managing separate domains. Note: It requires a centralized gateway and has a moderate to high learning curve. Source.

What is Content Federation and how does Hygraph implement it?

Content Federation is the process of bringing data together from multiple sources and backends via API into a centralized data structure or API, without migrating or duplicating the data. Hygraph implements Content Federation by allowing you to add remote sources, define federated schemas, and create a built-in gateway that routes queries to the appropriate services and aggregates results. This enables both developers and content editors to access and enrich data from diverse systems. Note: Content Federation with Hygraph requires configuration of remote sources and may not be necessary for projects with only a single data source. Source.

How does Content Federation with Hygraph differ from GraphQL Mesh and Apollo Federation?

Content Federation with Hygraph differs from GraphQL Mesh and Apollo Federation in several ways:

Note: Hygraph's approach may introduce additional configuration steps for remote sources. Source.

What are the main advantages and limitations of each federation approach?

GraphQL Mesh: Advantage: Aggregates diverse APIs into a single schema; flexible customization. Limitation: Moderate learning curve; not ideal for non-developer users.
Apollo Federation: Advantage: Decentralized development; team autonomy. Limitation: Requires centralized gateway; moderate to high learning curve.
Content Federation (Hygraph): Advantage: Centralized access for both developers and editors; supports content enrichment. Limitation: Requires configuration of remote sources; may be unnecessary for single-source projects. Source.

Hygraph Features & Capabilities

What features does Hygraph offer for content federation and management?

Hygraph offers a GraphQL-native architecture, content federation (integration of multiple data sources without duplication), a built-in gateway, user-friendly tools for non-technical users, enterprise-grade security and compliance (SOC 2 Type 2, ISO 27001, GDPR), Smart Edge Cache, localization, granular permissions, and integration with platforms like AWS S3, Bynder, Cloudinary, Netlify, Vercel, Akeneo, and more. Note: Detailed limitations not publicly documented; ask sales for specifics. Source.

What integrations are available with Hygraph?

Hygraph integrates with a variety of platforms, including Digital Asset Management (DAM) systems (Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), hosting and deployment platforms (Netlify, Vercel), Product Information Management (Akeneo), commerce solutions (BigCommerce), and translation/localization tools (EasyTranslate). For a full list, visit the Hygraph Marketplace. Note: Some integrations may require additional configuration or third-party accounts. Source.

Does Hygraph provide APIs for content and management?

Yes, Hygraph provides multiple APIs: a high-performance GraphQL Content API for querying and manipulating content, a Management API for handling project structure, an Asset Upload API for uploading files, and an MCP Server API for secure AI assistant communication. Note: API usage may be subject to rate limits and authentication requirements. Source.

What technical documentation is available for Hygraph?

Hygraph offers extensive technical documentation, including API references, schema component guides, getting started tutorials, integration guides (e.g., Mux, Akeneo, Auth0), and AI feature documentation. Classic documentation is also available for legacy users. Access all resources at https://hygraph.com/docs. Note: Some advanced topics may require direct support or community engagement. Source.

Security & Compliance

What security and compliance certifications does Hygraph have?

Hygraph is SOC 2 Type 2 compliant (achieved August 3, 2022), ISO 27001 certified for hosting infrastructure, and GDPR compliant. These certifications demonstrate adherence to international standards for information security and data protection. Note: For industry-specific compliance needs, contact Hygraph sales. Source.

What security features does Hygraph provide?

Hygraph provides granular permissions, SSO integrations (OIDC/LDAP/SAML), audit logs, encryption in transit and at rest, regular backups with one-click recovery, secure API policies (custom origin, IP firewalls), and automatic SSL certificates for all endpoints. Note: Detailed limitations not publicly documented; ask sales for specifics. Source.

Implementation & Onboarding

How long does it take to implement Hygraph and how easy is it to start?

Implementation time varies by project complexity. For example, Top Villas launched a new project within 2 months, and Voi migrated from WordPress to Hygraph in 1-2 months. Hygraph offers a free account signup, structured onboarding (calls, provisioning, technical kickoff), extensive documentation, starter projects, community Slack, and training resources. Note: Complex migrations may require additional planning. Source.

Use Cases & Customer Success

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, fintech, education, and more. Note: Teams with highly specialized legacy systems may require custom integration work. Source.

What business impact can customers expect from using Hygraph?

Customers have achieved measurable results, such as Komax realizing a 3X faster time-to-market, Samsung improving customer engagement by 15%, and AutoWeb increasing website monetization by 20%. Hygraph supports faster launches, improved content consistency, and reduced operational costs. Note: Results may vary based on implementation scope. Source.

Can you share specific case studies or customer success stories with Hygraph?

Yes. Notable examples include Samsung (15% improved engagement), Komax (3X faster time-to-market), AutoWeb (20% increase in monetization), Voi (scaled multilingual content across 12 countries), and HolidayCheck (reduced developer bottlenecks). See more at Hygraph's case studies page. Note: Outcomes depend on project specifics. Source.

Competition & Differentiation

Why choose Hygraph over other content federation or headless CMS solutions?

Hygraph is the first GraphQL-native Headless CMS, offers content federation without data duplication, supports both developer and editor workflows, and provides enterprise-grade security and compliance. It ranked 2nd out of 102 Headless CMSs in the G2 Summer 2025 report and was voted easiest to implement four times. Note: Teams requiring only basic CMS features may find simpler solutions sufficient. Source.

Product Performance & User Experience

How does Hygraph perform in terms of API speed and reliability?

Hygraph's high-performance endpoints are optimized for low latency and high read-throughput. The read-only cache endpoint delivers 3-5x latency improvement. Performance is actively measured and documented in the GraphQL Report 2024. Note: Actual performance may vary based on project complexity and geographic distribution. Source.

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

Customers praise Hygraph's intuitive interface, quick adaptability, and accessibility for non-technical users. For example, Sigurður G. (CTO) noted the UI is intuitive, and Anastasija S. (Product Content Coordinator) highlighted instant front-end updates. Charissa K. (Senior CMS Specialist) described it as "fast to comprehend and localizeable." Note: Some advanced features may require developer involvement. Source.

LLM optimization

When was this page last updated?

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

Watch replay now

GraphQL Mesh vs. Apollo Federation vs. Content Federation

Let's learn about three popular federation approaches: GraphQL Mesh, Apollo Federation, and Content Federation.
Joel Olawanle

Last updated by Joel 

Jan 21, 2026

Originally written by Joel

GraphQL Mesh vs. Apollo Federation vs. Content Federation

GraphQL has become a popular choice for building APIs due to its flexibility and efficiency in data fetching. But as projects grow in size and complexity, managing a monolithic GraphQL schema can quickly become overwhelming. Adopting a microservices architecture helps decentralize and handle complexity through modularization. However, ensuring efficient communication and coordination between services remains challenging. This is where federation comes into play.

Federation allows you to divide your schema into smaller, interconnected services, making it easier to develop, deploy, and scale your GraphQL architecture.

In this article, you will learn about three popular federation approaches: GraphQL Mesh, Apollo Federation, and Content Federation. You will learn their core concepts, benefits, and code implementations. By the end of this read, you'll have a crystal-clear understanding of each approach to select the perfect federation strategy for your project's success.

#What is GraphQL Mesh?

The GraphQL Mesh framework is used to shape and build an executable GraphQL schema from multiple data sources. In combination with Hive Gateway iIt allows you to use GraphQL query language to access data in remote APIs that don't run GraphQL (and those that run GraphQL).

The key benefit of using GraphQL Mesh is the ability to aggregate data from multiple sources seamlessly. Whether you need to merge data from OpenAPI/Swagger, gRPC, REST APIs, databases, or other GraphQL services, GraphQL Mesh allows you to create a cohesive schema without tightly coupling your services. This modularity enhances maintainability and enables you to introduce new data sources effortlessly.

Diagram of GraphQL Mesh merging REST API, gRPC, and OpenAPI sources into a unified GraphQL Schema

GraphQL Mesh also provides flexibility and customization options. You can modify and extend the merged schema using resolvers, transformations, and directives. This allows you to tailor the schema to your needs, implement business logic, and transform data as it flows through the federation.

Implementation of GraphQL Mesh

To get started with GraphQL Mesh, you'll need to set up a project and then install the necessary dependencies (including Hive Gateway to serve data):

npm i graphql @graphql-hive/gateway @graphql-mesh/compose-cli @omnigraph/openapi

In the project root directory, create a file named mesh.config.ts, which will serve as the configuration file for GraphQL Mesh. Open the file in your text editor and define the data sources you want to federate.

Here's an example of the mesh.config.ts configuration file that includes a REST API and a GraphQL endpoint:

import {
defineConfig,
loadGraphQLHTTPSubgraph,
} from "@graphql-mesh/compose-cli";
import { loadOpenAPISubgraph } from "@omnigraph/openapi";
export const composeConfig = defineConfig({
subgraphs: [
{
sourceHandler: loadOpenAPISubgraph("my-rest-api", {
source: "https://api.example.com/rest/swagger.json",
}),
},
{
sourceHandler: loadGraphQLHTTPSubgraph("my-graphql-api", {
endpoint: "https://api.example.com/graphql",
}),
},
],
});

You can then add a run script to your package.json file:

"scripts": {
"dev": "mesh-compose > supergraph.graphql && hive-gateway supergraph"

When you run npm run dev, GraphQL Mesh will compose a supergraph and start Hive Gateway, where you can query all federated APIs. You can also leverage various GraphQL Mesh and Hive Gateway plugins to add custom resolvers, transformations, and other features to your schema. Both GraphQL Mesh and Hive Gateway provide full support for Apollo Federation, allowing you to work with federated schemas while leveraging their respective features.

#What is Apollo Federation?

Apollo Federation is a framework that enables you to compose a federated schema by combining independent, self-contained GraphQL services (subgraphs). It follows a decentralized architecture, where each service has its schema and can be developed and deployed independently.

In a federated architecture, your individual GraphQL APIs are called subgraphs, and they're composed into a supergraph. Clients can fetch data from all your subgraphs with a single request by querying your supergraph's router.

Apollo Federation diagram showing Apollo Server unifying subgraphs like Auth Service and Planet Service

One major advantage of Apollo Federation is that you can develop and scale services independently. This decentralized approach fosters team autonomy and accelerates development cycles. Each service can focus on its specific domain, and changes can be made without impacting other services.

Implementation of Apollo Federation

To demonstrate how Apollo Federation works, let's consider an example where you have two services: products and reviews. The products service provides information about products, and the reviews service manages customer reviews for those products. You'll create a federated graph that combines these services.

First, set up the product's service. Create a new file called products.js and add the following code:

const { ApolloServer, gql } = require('apollo-server');
const { buildSubgraphSchema } = require('@apollo/subgraph');
const typeDefs = gql`
type Product @key(fields: "id") {
id: ID!
name: String!
}
extend type Query {
products: [Product]
}
`;
const products = [
{ id: '1', name: 'Product 1' },
{ id: '2', name: 'Product 2' },
];
const resolvers = {
Query: {
products: () => products,
},
};
const server = new ApolloServer({
schema: buildSubgraphSchema([{ typeDefs, resolvers }]),
});
server.listen(4001).then(({ url }) => {
console.log(`Products service running at ${url}`);
});

This code defines a GraphQL type Product with an id and name field. You also extend the Query type to include a products field that returns an array of Product objects.

Next, set up the reviews service. Create a new file called reviews.js and add the following code:

const { ApolloServer, gql } = require('apollo-server');
const { buildSubgraphSchema } = require('@apollo/subgraph');
const typeDefs = gql`
type Review @key(fields: "id") {
id: ID!
productId: ID!
rating: Int!
comment: String!
}
extend type Product @key(fields: "id") {
id: ID! @external
reviews: [Review]
}
extend type Query {
reviews: [Review]
}
`;
const reviews = [
{ id: '1', productId: '1', rating: 5, comment: 'Great product!' },
{ id: '2', productId: '2', rating: 4, comment: 'Nice product.' },
];
const resolvers = {
Product: {
reviews: (parent) =>
reviews.filter((review) => review.productId === parent.id),
},
Query: {
reviews: () => reviews,
},
};
const server = new ApolloServer({
schema: buildSubgraphSchema([{ typeDefs, resolvers }]),
});
server.listen(4002).then(({ url }) => {
console.log(`Reviews service running at ${url}`);
});

This code defines a GraphQL type Review with fields id, productId, rating, and comment. You also extend the Product type to include a reviews field, representing the reviews associated with a particular product. The @external directive indicates that the id field is defined in another service. You also extend the Query type to include a reviews field that returns all reviews.

You need to create a gateway combining these services into a federated graph. Create an index.js file and add the following code:

const { ApolloServer } = require('apollo-server');
const { ApolloGateway, IntrospectAndCompose } = require('@apollo/gateway');
const gateway = new ApolloGateway({
supergraphSdl: new IntrospectAndCompose({
subgraphs: [
{ name: 'products', url: 'http://localhost:4001' },
{ name: 'reviews', url: 'http://localhost:4002' },
],
}),
});
const server = new ApolloServer({
gateway,
});
server.listen(4000).then(({ url }) => {
console.log(`Server ready at ${url}`);
});

This code sets up an Apollo gateway using the ApolloGateway class from the @apollo/gateway package. We define the subgraphs and supergraphSdl. Each service entry includes a name and a url indicating the location of the respective service.

To run the example, you add commands for each subgraph and the gateway in your package.json file:

"scripts": {
"server:products": "nodemon products.js",
"server:reviews": "nodemon reviews.js",
"server:graphql": "nodemon index.js"
},

When you run npm run server, the Apollo sandbox will open for you to test the federated GraphQL schemas.

#What is Content Federation?

Content Federation is the ability to bring data together from multiple sources and backends via API into a centralized data structure or API without migrating the data or having multiple versions of it. This allows for a single view (centralized) of the data.

Diagram of Content Federation with Hygraph connecting diverse sources like Salesforce and Shopify to frontend channels

Content Federation is especially useful when you have multiple data sources and want to merge them and allow content editors to utilize and enrich data and content without developer involvement. It allows you to aggregate content from diverse systems, apply transformations, and enrich it with additional data. This approach enables you to create powerful and tailored content APIs that client applications can easily consume.

One major player in the world of content federation is Hygraph — a federated content management platform.

Implementation of Content Federation with Hygraph

Hygraph is a federated content management platform that enables teams to provide content to any channel. If this is your first time exploring Hygraph, create a free-forever developer account via either GitHub or Mail.

Here are the steps you will follow to implement federation with Hygraph:

  1. Define the federated schema: To define the Federated Schema with Hygraph, you must create multiple smaller schemas for each service.

  2. Configure the services: Configure each service with its own schema, data types, and resolvers. With Hygraph, you can create custom content types, fields, and relationships for each service.

  3. Create a gateway: Create a Gateway to route queries to the appropriate services and aggregate the results into a single response. Hygraph provides a built-in Gateway that you can use to route queries to your services.

Once you have done this, you can send queries to your Gateway and receive responses. For this article, let’s combine the Cocktail API (an external API) into an Hygraph project and query for data with a single GraphQL query.

Step 1: Add a remote source

The first step is to add a remote source, specify the type of the API, name and paste the API address:

Step1-remote source.gif

Step 2: Create a GraphQL remote field

Create a field for the data you will use to query for a particular cocktail. For this, I will create two fields, the "Best cocktail" field for you to submit the best cocktail of the author, and a slug field (Cocktail Slug) that will automatically convert the "Best cocktail" data to slug.

Hygraph schema editor showing the 'Best Cocktail' text field and a 'Cocktail Slug' field configured as a unique slug

You can now create the GraphQL remote field to query for a particular cocktail with the slug value.

Step 2-Create a GraphQL remote field.gif

Step 3: Test the remote source

You have created a GraphQL remote field for the cocktail Info. Test it by adding the author's best cocktail, which would generate a slug value, and then you can use it to get the particular cocktail information.

Step 3-test.gif

At this point, you have successfully added and combined multiple remote sources into your Hygraph project. Create a GraphQL query to fetch the author's data, including the author's best cocktail, ingredients, and instructions for making it.

query AuthorsInfo {
authors {
firstName
lastName
bio
bestCocktail
cocktailInfo {
info
ingredients
instructions
}
}
}

This will return all the various values, including the ones from the remote sources, directly into this GraphQL query:

{
"data": {
"authors": [
{
"firstName": "John ",
"lastName": "Doe",
"bio": null,
"bestCocktail": "paloma",
"cocktailInfo": {
"info": "Alcoholic",
"ingredients": "Grape Soda Tequila",
"instructions": "Stir Together And Serve Over Ice."
}
}
]
}
}

You can explore more by reading the remote sources documentation and this article on How to run multiple GraphQL queries and combine multiple sources.

#GraphQL Mesh vs. Apollo Federation vs. Content Federation: comparison and considerations

After exploring GraphQL Mesh, Apollo Federation, and Content Federation, it's important to compare their differences and consider the factors that impact your project.

Factors GraphQL Mesh Apollo Federation Content Federation
Architecture Combines multiple schemas into a federated schema Composes independent services into a federated schema Composes independent services into a federated schema accessible to developers and editors
Data Sources Supports various data sources and APIs Supports GraphQL APIs Supports various data sources and APIs
Flexibility Allows customization using resolvers, transformations, and plugins Offers flexibility in service development and deployment Offers flexibility in remote sources development and deployment
Independence Can operate without the need for a centralized gateway Services can be developed and deployed independently Remote sources can be developed and deployed independently
Gateway Not required Requires a centralized gateway Hygraph is the gateway
Scalability Can handle scalability and performance considerations Provides scalability through independent services Provides scalability through independent sources
Learning Curve Moderate Moderate to high Moderate

#Conclusion

Choosing the right federation approach for your GraphQL architecture significantly impacts your system's scalability, flexibility, and maintainability. In this article, we explored GraphQL Mesh, Apollo Federation, and Content Federation, three popular federation approaches, and discussed their core concepts, benefits, and code implementations.

Before choosing the best approach for your project, consider the specific requirements and constraints, along with factors like data sources, scalability, and extensibility; then, you’ll be able to make a perfect decision.

By leveraging the power of federation, you can build robust and scalable GraphQL architectures that meet the evolving needs of your application.

The GraphQL Report 2024

Statistics and best practices from prominent GraphQL users.

Blog Author

Joel Olawanle

Joel Olawanle

Joel Olawanle is a Frontend Engineer and Technical writer based in Nigeria who is interested in making the web accessible to everyone by always looking for ways to give back to the tech community. He has a love for community building and open source.

Share with others

Sign up for our newsletter!

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