Frequently Asked Questions

Schema Stitching, GraphQL Federation, & Content Federation

What is schema stitching in GraphQL?

Schema stitching is a technique that combines multiple GraphQL schemas from different microservices into a single unified schema, exposed via a gateway. The gateway imports individual schemas and stitches them together, allowing clients to query all services through one endpoint. This approach is suitable for scenarios where services are already built independently and need to be unified quickly. Read more.

How does GraphQL Federation differ from schema stitching?

GraphQL Federation is a scalable solution for building large systems by combining multiple GraphQL services (subgraphs) into a supergraph using a router. Unlike schema stitching, Federation enforces the separation of concerns principle, where each subgraph is responsible for its own types and fields. The router automatically merges schemas, making it ideal for large-scale, maintainable architectures. Learn more.

What is content federation and how does Hygraph implement it?

Content federation is the process of integrating data from multiple sources and backends into a CMS platform via API, without migrating or duplicating the data. Hygraph implements content federation through Remote Sources, allowing users to configure external RESTful or GraphQL APIs and query them from within Hygraph. This creates a unified API for content management and delivery. See details.

What are the key differences between schema stitching, GraphQL federation, and content federation?

Schema stitching combines multiple GraphQL schemas into one via a gateway, suitable for quick unification of independent services. GraphQL Federation uses a router to merge subgraphs, enforcing separation of concerns and supporting large-scale, maintainable systems. Content federation, as implemented by Hygraph, integrates data from remote sources into a CMS, focusing on content aggregation without data migration. Compare here.

When should I use schema stitching versus GraphQL federation?

Schema stitching is best for scenarios where services are already built independently and need to be unified quickly with minimal shared types. GraphQL Federation is preferable for large-scale systems with many shared types and multiple teams, as it supports scalability, maintainability, and independent development of subgraphs. Read the full comparison.

How does content federation benefit CMS users?

Content federation allows CMS users to aggregate and manage content from various systems without migrating or duplicating data. This streamlines workflows, reduces maintenance, and enables unified content delivery across channels. Hygraph's content federation supports both RESTful and GraphQL APIs for maximum flexibility. Learn more.

What is the learning curve for schema stitching, GraphQL federation, and content federation?

Schema stitching and content federation generally have a low learning curve, making them accessible for quick integration. GraphQL Federation has a higher learning curve due to its advanced concepts and schema design requirements, but it offers greater scalability and maintainability for large systems. See the comparison table.

Can I use content federation with both REST and GraphQL APIs in Hygraph?

Yes, Hygraph's content federation supports integrating both RESTful and GraphQL APIs as remote sources, allowing you to unify content from a wide range of external systems. More info.

How does Hygraph's content federation differ from backend-focused federation approaches?

While schema stitching and GraphQL federation are primarily backend-focused, designed to unify GraphQL services, Hygraph's content federation is tailored for CMS use cases. It enables content aggregation from multiple sources directly within the CMS, streamlining content management and delivery without backend migrations. Explore Hygraph's approach.

What are the main use cases for content federation in Hygraph?

Content federation in Hygraph is ideal for organizations that need to aggregate content from multiple systems (such as legacy CMS, eCommerce platforms, or external APIs) into a single, unified content hub. This is especially useful for global brands, enterprises, and teams managing omnichannel content delivery. See use cases.

Features & Capabilities

What are the key features of Hygraph?

Hygraph offers 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 modernize content management and deliver exceptional digital experiences. See all features.

Does Hygraph support high-performance content delivery?

Yes, Hygraph provides high-performance endpoints designed for low latency and high read-throughput content delivery. The platform actively measures and optimizes API performance, as detailed in the performance improvements blog and GraphQL Survey 2024.

What integrations does Hygraph offer?

Hygraph integrates with a variety of digital asset management (DAM) systems (e.g., Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), as well as tools like Adminix and Plasmic. Developers can also build custom integrations using SDKs or connect external APIs via REST and GraphQL. See all integrations.

Does Hygraph provide APIs for developers?

Yes, Hygraph offers multiple APIs, including Content API, High Performance Content API, MCP Server API, Asset Upload API, and Management API. These APIs support a wide range of content management and integration scenarios. API Reference.

What technical documentation is available for Hygraph?

Hygraph provides extensive technical documentation, including API references, schema components, references, webhooks, and AI integrations. Access all resources at Hygraph Documentation.

How does Hygraph help with localization and asset management?

Hygraph offers robust localization and asset management features, making it easy for global teams to manage content in multiple languages and handle digital assets efficiently. These capabilities are especially valuable for enterprises with diverse, international operations. Learn more.

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 ensure high standards for data security and privacy. See security details.

How does Hygraph ensure data security?

Hygraph employs enterprise-grade security features, including granular permissions, audit logs, SSO integrations, encryption at rest and in transit, regular backups, and dedicated hosting options in multiple regions. More on security.

What is the Smart Edge Cache feature in Hygraph?

Smart Edge Cache is a performance optimization feature in Hygraph that ensures faster content delivery by caching content at the edge, reducing latency for global audiences. Feature details.

Pricing & Plans

What pricing plans does Hygraph offer?

Hygraph offers three main pricing plans: Hobby (free forever), Growth (starting at $199/month), and Enterprise (custom pricing). Each plan is tailored to different team sizes and project needs. See pricing.

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. Full details.

What does the Growth plan cost and include?

The Growth plan starts at $199 per month and includes 3 locales, 10 seats, 4 standard roles, 200MB per asset upload, remote source connection, 14-day version retention, and email support. Growth plan info.

What is included in the Enterprise plan?

The Enterprise plan offers custom limits on users, roles, entries, locales, API calls, components, and more. It includes advanced features like scheduled publishing, dedicated infrastructure, global CDN, SSO, multitenancy, instant backup recovery, custom workflows, and dedicated support. Enterprise plan details.

Is there a free trial for the Enterprise plan?

Yes, Hygraph offers a 30-day free trial for the Enterprise plan. Start your trial.

Use Cases & Benefits

Who can benefit from using Hygraph?

Hygraph is designed for developers, product managers, content creators, marketers, and solutions architects in enterprises, agencies, eCommerce, media, technology, healthcare, and more. Its flexibility and scalability make it suitable for a wide range of industries. See case studies.

What business impact can I expect from using Hygraph?

Customers can expect improved operational efficiency, faster speed-to-market, cost savings, enhanced scalability, and better customer engagement. For example, Komax achieved a 3x faster time-to-market, and Samsung improved customer engagement by 15%. See business impact.

What problems does Hygraph solve for organizations?

Hygraph addresses operational inefficiencies (eliminating developer dependency, modernizing legacy tech stacks), financial challenges (reducing costs, accelerating launches), and technical issues (simplifying schema evolution, integrating third-party systems, optimizing performance, and improving localization and asset management). See solutions.

Can you share specific customer success stories with Hygraph?

Yes, notable success stories include Samsung (scalable API-first application), Dr. Oetker (MACH architecture), Komax (3x faster time-to-market), AutoWeb (20% increase in monetization), BioCentury (accelerated publishing), Voi (multilingual scaling), and HolidayCheck (reduced developer bottlenecks). Read case studies.

What industries are represented in Hygraph's case studies?

Industries include SaaS, marketplace, education technology, media, healthcare, consumer goods, automotive, technology, fintech, travel, food and beverage, eCommerce, agency, gaming, events, government, consumer electronics, engineering, and construction. See all industries.

How long does it take to implement Hygraph?

Implementation time varies by project complexity. For example, Top Villas launched a new project in just 2 months, and Si Vale met aggressive deadlines with a smooth rollout. Hygraph's onboarding process and resources support fast adoption. See implementation examples.

How easy is it to get started with Hygraph?

Hygraph offers a free API playground, a free forever developer account, structured onboarding, training resources, extensive documentation, and a community Slack channel for support. These resources make it easy for both technical and non-technical users to start quickly. Get started.

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

Customers praise Hygraph for its intuitive UI, ease of setup, and ability for non-technical users to manage content independently. Real-time changes and custom app integrations enhance the user experience. Some users note that complex projects may require more technical expertise. See feedback.

Competition & Comparison

How does Hygraph compare to traditional CMS platforms?

Hygraph stands out as the first GraphQL-native headless CMS, offering content federation, modern workflows, and user-friendly tools. Unlike traditional CMS platforms that rely on REST APIs and developer intervention, Hygraph enables faster content updates, scalability, and integration with modern tech stacks. Compare CMSs.

What makes Hygraph different from other headless CMS solutions?

Hygraph differentiates itself with its GraphQL-native architecture, content federation, Smart Edge Cache, enterprise-grade security, and proven ROI. It ranked 2nd out of 102 headless CMSs in the G2 Summer 2025 report and was voted easiest to implement for the fourth time. See G2 ranking.

Why should I choose Hygraph over alternatives?

Hygraph offers unique advantages such as content federation, user-friendly tools, scalability, and robust security. Its proven customer success stories and industry recognition make it a strong choice for businesses seeking modern content management. See why customers choose Hygraph.

How does Hygraph address common pain points better than competitors?

Hygraph eliminates developer dependency, supports modern workflows, integrates multiple data sources, reduces operational costs, and accelerates speed-to-market. Its GraphQL-native approach and content federation set it apart from competitors like Contentful, Sanity, and Prismic. See differentiation.

What customer proof is available for Hygraph's effectiveness?

Hygraph's effectiveness is demonstrated by customer case studies from Samsung, Dr. Oetker, Komax, AutoWeb, BioCentury, Voi, and HolidayCheck, among others. These stories highlight measurable improvements in speed, scalability, and engagement. Read customer proof.

Introducing Click to Edit

Schema Stitching vs. GraphQL Federation vs. Content Federation

We will discuss Schema Stitching, GraphQL Federation, and Content Federating. Describe their definitions and the differences between them.
Aagam Vadecha

Written by Aagam 

Aug 08, 2023
Schema Stitching vs. GraphQL Federation vs. content federation

This article assumes you have a decent knowledge of building basic GraphQL servers and fundamental GraphQL concepts. If you are new to GraphQL, we recommend starting with this article.

#Introduction to Schema Stitching

Graphic 1_ Schema Stitching vs GraphQL Federation vs Content Federation.png

Schema stitching is one of the ways in which we can combine multiple GraphQL services and expose them collectively via a single endpoint to the clients. In schema stitching, there are many GraphQL microservices, and we have a Gateway in front of these microservices that interacts with the client. The way this technique works is by importing individual schemas from different services on the gateway. The schemas are then stitched by the gateway, wherein the gateway combines all types, queries, and mutations from different services into a new executable schema which is then exposed to the clients.

To understand Schema Stitching better, let us take an example, suppose we have a User Microservice and a Contact Microservice. The relationship is one user can have many contacts.

This is our User service schema

type User {
id: ID!
name: String!
email: String!
}
type Query {
user(id: ID!): User
users: [User!]!
}

The GraphQL schema defines User type and exposes two queries - user to retrieve a single user and users​​ to fetch a list of users.

This is our Contact service schema

type Contact {
id: ID!
name: String!
phoneNumber: String!
userId: ID!
}
type Query {
contact(id: ID!): Contact
contacts: [Contact!]!
}

This GraphQL schema defines a Contact type and exposes two queries - contact to retrieve a single contact and contacts to fetch a list of contacts.

Let us say these two schemas are served by two different GraphQL endpoints, now in order to query everything under a single endpoint, we need to set up a gateway service that will combine these schemas and stitch them like this.

import { ApolloServer } from '@apollo/server';
import { startStandaloneServer } from '@apollo/server/standalone';
import { getGatewaySchema } from './schema.js';
import { buildHTTPExecutor } from '@graphql-tools/executor-http';
import { schemaFromExecutor } from '@graphql-tools/wrap';
import { stitchSchemas } from '@graphql-tools/stitch'
const USER_SERVICE_ENDPOINT = 'http://localhost:4001/graphql';
const CONTACT_SERVICE_ENDPOINT = 'http://localhost:4002/graphql';
const PORT = 4000;
async function getExecutableSubSchema(endpoint) {
const executor = buildHTTPExecutor({
endpoint
});
const schema = await schemaFromExecutor(executor);
return {
schema,
executor
}
}
async function getGatewaySchema() {
const userSubSchema = await getExecutableSubSchema(USER_SERVICE_ENDPOINT);
const contactSubSchema = await getExecutableSubSchema(CONTACT_SERVICE_ENDPOINT);
const gatewaySchema = stitchSchemas({
subschemas: [userSubSchema, contactSubSchema]
});
return gatewaySchema;
}
async function startApolloServer() {
const gatewaySchema = await getGatewaySchema();
const server = new ApolloServer({
schema: gatewaySchema,
});
const { url } = await startStandaloneServer(server, { listen: { port: PORT } })
console.log(`🚀 Gateway started at: ${url}`);
}
startApolloServer();

The provided gateway code sets up an Apollo server that acts as a gateway to multiple GraphQL services. The getGatewaySchema function stitches the schemas of the user service and contacts service together using the stitchSchemas function from @graphql-tools. This code enables the gateway to handle incoming GraphQL queries and distribute them to the respective services, aggregating and returning the results to the client.

We can also query types that have relations and configure how to resolve data across our microservices. For instance, in the above example, you may want to query all contacts for a user, or while querying contacts, you may want to see what contact a user belongs to.

In schema stitching, to resolve these situations, there are three approaches Schema Extensions Type Merging Directive-based Type Merging

Schema Extensions and Type Merging are techniques wherein we write some code at the gateway level to accommodate type merging. The Gateway will have a bird’s-eye view of its all microservices and their respective types, it will extend these types and delegate resolving fields of different types to respective microservices. We have to manually provide and maintain this configuration in the Gateway code. Directive-based type merging is a technique that is similar to Federation, wherein the microservices will have the configuration on how to resolve fields and not the Gateway.

Schema stitching is a quick solution to provide you with a unified GraphQL API. It is appropriate for use cases where there are not many shared types among GraphQL services, and we just want to combine different GraphQL services under a single endpoint. For example, if we have a software product with a backend GraphQL API and we have another separate PDF GraphQL microservice. Now we want the frontend systems to access these two backend services via a unified interface then, schema stitching will be a good approach as it requires less effort. Also, the Product and PDF microservice will not have so many shared types, so maintenance on the gateway is likely to be low. Schema stitching provides a quick and straightforward way to combine schemas.

Given that we can manage shared types in schema stitching and resolve fields via the Gateway, it is likely that gateway code can quickly get messy if numerous teams are managing a large number of microservices with many common types. Stitching might not be the most optimal choice for building very large-scale systems. If you have many microservices that use shared types and different microservices are responsible for different fields of a shared type, then it's probably better to take a look at GraphQL Federation.

#Introduction To GraphQL Federation

Graphic 2_ Schema Stitching vs GraphQL Federation vs Content Federation.png

Similar to Schema Stitching, GraphQL Federation also allows you to bring multiple GraphQL services under a single endpoint. Federation is a long-term scalable solution that allows you to build large systems and scale them as per your needs with low maintenance efforts. It is harder to implement a federated graph compared to stitching two existing GraphQL microservices and has a steeper learning curve as developers need to understand all federation ecosystem concepts and implement all microservices accordingly, whereas schema stitching is more like integrating a library over your existing services.

In federation, particularly talking about Apollo federation, we call individual GraphQL services with their individual schemas and resolvers as SubGraphs. There is also a Router that builds a SuperGraph from existing subgraphs and is exposed to the client. The high-level architecture might look similar to schema stitching, but the code-level implementation and, most importantly the GraphQL schema design of subgraphs differ greatly compared to schema stitching.

Federation highly promotes the separation of concerns principle. Designing schemas that are separated by concerns is essential for implementing federated graphs. For example, in the schema stitching example above, we saw User and Contact types individually existing in User and Contact services, respectively. The Gateway can have the connection logic implemented and type merging if needed. On the other side, the federation promotes building schemas that are separated by concerns. This means each subgraph should define types and fields that it is responsible for populating from its backend data store. To build a federated graph for the same use case, this is how our schemas would look like.

User service schema

type User @key(fields:"id") {
id: ID!
name: String!
email: String!
}
type Query {
user(id: ID!): User
users: [User!]!
}

Contact service schema

type User @key(fields: "id"){
id: ID!
userContacts: [Contact!]!
}
type Contact {
id: ID!
name: String
phoneNumber: String
user: User
}
type Query {
contact(id: ID!): Contact
contacts: [Contact!]!
}

Carefully check the User type. It is defined in both the User and Contact subgraph. This is the separation of concerns principle in effect. Even though userContacts is actually a field of User type, it is not defined in the user service but in the contact service because it has more to do with getting all contacts, so we shared the User type between contact and user subgraphs. These shared types are known as entities in federation, and different subgraphs might be responsible for populating different fields of an entity. The @key directive is used to define the primary key (in this case - id) among all subgraphs, which denotes how to uniquely identify a User type across subgraphs. From the perspective of the User type, when you query from the unified gateway, the fields name and email will be resolved by the User subgraph, and the field userContacts will be resolved by the Contact subgraph.

In Federation, the router will build the supergraph automatically and also handle the type merging for you, all you need to do is provide subgraph URLs to the router, and it will build the supergraph for you by a process known as composition. Once your router is up, it will expose all fields under a unified User type, and you can directly make a nested query below, and it will be handled by respective subgraphs.

query {
users {
name
email
userContacts {
name
phoneNumber
}
}
}

GraphQL Federation is the ideal choice when there are multiple teams maintaining different services with their own data and functionality, there are many shared types. You must carefully design your schemas in your subgraphs based on the design principle of separation by concerns. It is good to use federation when designing your services from scratch that can scale well.

#Introduction to Content Federation

Same / Similar Graphic from this section can be put here

Content federation is again the ability to bring data together from multiple sources and backends via API instead of actually migrating the data itself. It sounds a lot like what we have seen so far in this article, but it is directed more towards a CMS context, whereas schema stitching and GraphQL federation are directed more towards building a backend GraphQL server.

If you are using a CMS service or have your own CMS set up, and you want to integrate some additional data that is provided by some other external API, then you can use content federation if it is supported by your CMS. HyGraph supports content federation by Remote Sources. With Remote Sources, you can seamlessly configure any external data source and query it from the Playground. A Remote Source refers to a system or product that contains content that needs to be integrated with the content in Hygraph, creating a unified API. Setting up a Remote Source is a straightforward process through our user-friendly low-code interface. We provide support for both RESTful and GraphQL APIs. Take a deeper look at Content Federation in this article if you want to.

#Key Differences between Schema Stitching vs. GraphQL Federation vs. Content Federation

Schema Stitching GraphQL Federation Content Federation
Enables you to combine multiple GraphQL schemas into one. Enables a distributed architecture for a large-scale GraphQL backend. Integrates data from multiple remote sources into a CMS platform.
Two techniques of schema require manual update and maintenance of the gateway. The router automatically merges federated schema from subgraphs. Integrates data sources using remote configuration.
Separation of concerns is good to have but is not a strict requirement to be followed. The separation of concerns principle is mandatory and very important while designing the schema of subgraphs. Content Federation does not directly involve the separation of concerns principle.
Good for use cases when the services are already built independently, and we just need a way to bring them under a single endpoint. Good for use cases where we need to design large-scale GraphQL systems from scratch. Federation facilitates scalability, maintainability, and independent development of subgraphs. Good for use cases when there is already a CMS in our architecture, and we want to aggregate and manage content from various systems without migrating or duplicating the data.
The learning curve is low The learning curve is high The learning curve is low

The GraphQL Report 2024

Statistics and best practices from prominent GraphQL users.

Blog Author

Aagam Vadecha

Aagam Vadecha

As a Software Engineer, my daily routine revolves around writing scalable applications with clean code & maintaining them. In my spare time, I love to explore software architecture patterns, write tech articles & watch thrillers!

Share with others

Sign up for our newsletter!

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