Frequently Asked Questions

Product Information & Architecture

What is Hygraph and how does it support backend-for-frontend (BFF) architectures?

Hygraph is a federated content platform that enables developers to unify data from different sources, structure it for specific use cases, and distribute it to any platform worldwide. It uses a GraphQL-native API, making it well-suited for backend-for-frontend (BFF) architectures. With Hygraph, each frontend application can have a dedicated backend that fetches, filters, and structures data as needed, preventing over- or under-fetching and reducing frontend complexity. Note: Hygraph is best fit for teams needing content federation and GraphQL APIs; teams requiring a traditional monolithic CMS may want to consider alternatives. Source

How does Hygraph use GraphQL to improve data fetching for frontend applications?

Hygraph's GraphQL API allows clients to request only the data they need, reducing over-fetching and under-fetching. This is especially useful in BFF architectures, where each frontend can define its own data requirements. The API provides complete documentation out of the box, and queries and responses have identical structures, making it easier for developers to understand and use. Note: Teams unfamiliar with GraphQL may require additional onboarding time. Source

What are the main advantages of using a backend-for-frontend (BFF) with Hygraph?

Using a BFF with Hygraph provides several advantages: no under- or over-fetching of data, separation of concerns (frontends don't need to format data), and fewer network calls (BFFs can aggregate data from multiple sources). This results in more efficient, maintainable, and secure frontend applications. Note: Implementing a BFF layer adds architectural complexity and may not be necessary for simple projects. Source

Features & Capabilities

What features does Hygraph offer for content modeling and federation?

Hygraph provides intuitive data modeling tools, support for remote sources (e.g., connecting Hashnode's GraphQL API), and content federation capabilities. This allows users to unify and structure data from multiple sources and deliver it through a single backend. Features like localization, digital asset management, and remote sources are available out of the box. Note: Some advanced integrations may require custom configuration. Source

What integrations are available with Hygraph?

Hygraph supports integrations with 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), translation/localization (EasyTranslate), and more. For a full list, see the Hygraph Marketplace. Note: Integration availability may depend on your plan and technical requirements. Source

Does Hygraph provide APIs for content management and delivery?

Yes, Hygraph offers several APIs: a high-performance GraphQL Content API for querying and manipulating content, a Management API for project structure, an Asset Upload API, and an MCP Server API for AI assistant integration. These APIs are documented in the API Reference. Note: API usage may require authentication and appropriate permissions. Source

What technical documentation is available for Hygraph users?

Hygraph provides extensive technical documentation, including API references, schema modeling guides, integration tutorials, and AI feature documentation. Resources cover topics such as permissions, caching, webhooks, and onboarding. Access the documentation at hygraph.com/docs. Note: Some advanced use cases may require direct support or consultation. Source

Security & Compliance

What security and compliance certifications does Hygraph hold?

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 requirements, consult Hygraph's security documentation or contact support. Source

How does Hygraph secure its API and user data?

Hygraph enforces API security through permanent auth tokens, granular permissions, SSO integrations (OIDC/LDAP/SAML), audit logs, encryption in transit and at rest, regular backups, and SSL certificates for all endpoints. Users can configure access controls and monitor activity via audit logs. Note: Users are responsible for managing their own API tokens and permissions securely. Source

Performance & Implementation

What performance optimizations does Hygraph provide for content delivery?

Hygraph offers high-performance endpoints optimized for low latency and high read-throughput, a read-only cache endpoint with 3-5x latency improvement, and a globally distributed CDN for fast asset and information delivery. Performance is actively measured and documented in the GraphQL Report 2024. Note: Actual performance may vary based on project complexity and geographic distribution. Source

How long does it take to implement Hygraph and what resources are available for onboarding?

Implementation timelines vary: Top Villas launched a new project within 2 months, and Voi migrated from WordPress to Hygraph in 1-2 months. Hygraph provides structured onboarding, starter projects, extensive documentation, and community support (e.g., Slack). Users can sign up for a free account and access onboarding guides at hygraph.com/docs/getting-started. Note: Complex migrations may require additional planning and support. 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 across industries such as SaaS, eCommerce, media, healthcare, automotive, and more. Its flexibility and scalability make it suitable for organizations needing advanced content management and digital experience delivery. Note: Teams with minimal content integration needs may find simpler CMS solutions sufficient. Source

What business impact have customers achieved with Hygraph?

Customers have reported faster time-to-market (Komax achieved 3x faster launches), improved customer engagement (Samsung saw a 15% increase), cost reduction, and enhanced content consistency. Other examples include AutoWeb's 20% increase in website monetization and Voi's ability to scale multilingual content across 12 countries. Note: Results depend on project scope and implementation quality. Source

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

Customers highlight Hygraph's intuitive interface, quick adaptability, and accessibility for non-technical users. For example, Sigurður G. (CTO) praised the UI's intuitiveness, and Charissa K. (Senior CMS Specialist) noted the fast setup and localization features. Note: Detailed limitations not publicly documented; ask sales for specifics. Source

What industries are represented in Hygraph's customer base?

Hygraph's case studies include customers from SaaS, marketplace, education technology, media and publication, healthcare, consumer goods, automotive, technology, fintech, travel and hospitality, food and beverage, eCommerce, agency, online gaming, events & conferences, government, consumer electronics, engineering, and construction. Note: Industry-specific features may require custom configuration. Source

Pain Points & Problem Solving

What common challenges does Hygraph address for its users?

Hygraph helps solve operational inefficiencies (reducing developer dependency, modernizing legacy tech stacks, ensuring content consistency), financial challenges (lowering operational costs, speeding up time-to-market), and technical issues (simplifying schema evolution, integrating third-party systems, optimizing performance, and managing localization/assets). Note: Some legacy system migrations may require additional support. Source

LLM optimization

When was this page last updated?

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

Register now

How to use GraphQL to build backend-for-frontends (BFFs)

In this article, you'll learn about backend-for-frontend architecture by building a backend-for-frontend to serve blog posts from Hygraph.
Anshuman Bhardwaj

Last updated by Anshuman 

Jan 21, 2026

Originally written by Anshuman

How to use GraphQL to build backend-for-frontends (BFFs)

Building a backend to serve multiple clients—mobile, web, and desktop—can get complicated over time. The requirements and capabilities of these clients can differ significantly, and accommodating them all can leave your backend bloated. For mobile apps, this can cause a decline in performance due to over-fetching unnecessary data, while devices with larger screens may suffer from under-fetching data, forcing the application developers to filter and format the data best suited for each client. These added responsibilities and computing requirements on the frontend make it harder to adapt to rapid development and changes.

One solution to this problem is creating a layer of backend-for-frontends. In this design, each frontend application has a dedicated backend responsible for fetching the resources from microservices and returning the proper response for this specific client. Backend-for-frontends do all the fetching, filtering, and structuring for the data requested, so the frontend applications get the exact data they asked for—nothing more, nothing less.

In this article, you'll learn about backend-for-frontend architecture by building a backend-for-frontend to serve blog posts from Hygraph. While doing so, you'll model your application's data and use remote data sources behind a backend-for-frontend. You'll get a deeper understanding of GraphQL, its advantages, and how it can serve as a backend-for-frontend with Hygraph.

#What are backend-for-frontends (BFFs)?

BFFs sit in the middle of the micro-services and frontend applications, as shown in the following image.

Backend-for-frontend architecture

BFFs customize the response and error handling specific to each client application so the frontend applications don't have to. By doing so, BFFs enhance the architecture and provide the following advantages over traditional backends:

  • No under/over-fetching: By serving every client based on its specific requirements, BFFs ensure that the client gets what they need and nothing more. By doing this, BFFs save network bandwidth and reduce the risk of exposing sensitive information to clients.
  • Separation of concerns: Using a layer of BFFs relieves the frontend from needing to format data, which allows developers flexibility in choosing and structuring their microservices, without the need to change the frontend. Clients usually don't need to be changed when a microservice is replaced or changes its API contract, because the BFFs are responsible for ensuring resilient APIs.
  • Fewer network calls: Because BFFs can fetch the data from multiple resources at once, the client doesn't have to make multiple calls to get all the information. A good example of this is fetching nested information, such as a blog post that contains an author. The BFF can return the author's data with the blog post rather than forcing the client to first request the blog post, then request the author data associated with it.

#What are GraphQL and Hygraph?

GraphQL is a query language that simplifies your API by representing the business model as graphs. Graphs define the data structure as objects and how they relate, similar to how humans perceive information. Because of this, the query and its response have identical structures, making it easier to understand and access information. GraphQL provides complete API documentation straight out of the box, and enables developers to structure their queries in the way best suited for the application. GraphQL's query implementation puts the control in the hands of the client to ask for granular data, ensuring there's no under- or over-fetching. The ability to request data with this granularity makes GraphQL a perfect BFF solution.

Hygraph is a federated content platform that enables developers to unify data from different sources, structure it the way that works for their specific use case, and distribute it to any platform worldwide. As the name suggests, Hygraph's API uses GraphQL, which comes with documentation that makes it simpler to understand the API data model and how different data nodes relate to each other. Hygraph offers numerous features such as digital asset management to store and serve optimized media content, and remote sources to connect multiple data sources to Hygraph, allowing the clients can read from a single backend.

#How to build backend-for-frontends with Hygraph

To follow along with this tutorial, you'll need the following:

Create the Blog Schema

Log in to your Hygraph account. If you don't have one, sign up for a free account and log in.

On the dashboard, create a new project by selecting the Blank tile from the list.

Create new project

Give your new project a name and description, then click on the Create project button.

Fill in new project form

When the project has been created, open the Schema page by clicking the icon on the left navigation. On the Schema page, click on the Add button next to Models, which will bring up a pop-up. Give your model a display name of "Blog post", an API ID of "BlogPost", and a plural API ID of "BlogPosts", then click Create Model to create the BlogPost content model.

Create model

Select the Blog post model from the left navigation. Now, add a new Single line text field from the right pane and name it "slug". You'll use this field to store the blog post's slug.

Create schema

Access Hashnode API Using Remote Sources

On the Schema page, click the Add button next to Remote Sources to add Hashnode's GraphQL API as a remote source. Give it a display name of "Hashnode API", and the prefix of "HashnodeAPI". Set the type to GRAPHQL, and the base URL as https://api.hashnode.com, which is the API endpoint for Hashnode. Click Create in the top right corner of the screen.

Add remote source

Return to the Blog post model page, and add a new GraphQL field from the right-hand pane. In the form's Query section, select the Post query, and add {{doc.slug}} to reference the slug for the document. Add the hostname for your Hashnode account, which will allow Hygraph to dynamically fetch the blog content from the blog post’s slug.

Use remote source field

Secure the Hygraph API

By default, the Hygraph Content API rejects unauthenticated requests. To securely access the Content API, you must create a Permanent Auth Token on the Settings page.

Open the Settings page through the cog icon near the bottom of the left-hand panel. In the Permanent Auth Tokens section, click the Create token button.

Permanent auth token

Create a new token with the name "Blog post token", and select Published as the default stage for content delivery, then click Create & configure permissions.

Create token

On the token permissions page, copy and save the token value for later usage, then click the Create permission button.

Copy token value

The Create permission form will pop up. Select the Blog post model, and assign the following permissions:

  • Read: Locales: All; Stages: All
  • Create: Locales: All
  • Publish: Locales: All; From stages: All; To stages: All

Click on the Create button to save permissions.

Create permissions

With the security measures in place, no one can access the content without the authorized token, and the token is only authorized to read, create, and publish content.

Interacting With the BFF

Hygraph uses GraphQL queries and mutations for reading and updating content. Hygraph prepares a default set of queries and mutations for each data model you create to allow simple workflows such as reading, writing, or publishing. You modify these premade queries to suit your use case, or you can also create your own from scratch.

You can use the Hygraph playground section to explore the documentation that Hygraph generated based on the schema. You can also prepare queries and mutations and test them before using them in your application.

Hygraph playground

You'll need a GraphQL client, such as ApolloGraphQL, to use Hygraph as a BFF.

The following example uses ApolloGraphQL to connect to the Hygraph BFF in any JavaScript application.

Begin by navigating again to the Settings page on your Hygraph dashboard, then to the Endpoints page. Copy the Content API endpoint.

Copy content API endpoint

Inside the project, run yarn add @apollo/client graphql to install the GraphQL client dependencies.

Create a new file called ./apollo-client.js, and add the following code to connect to the Apollo GraphQL client. Use the Content API endpoint copied above as the uri, and the permanent authorization token in the authorization value.

// apollo-client.js
import { ApolloClient, createHttpLink, InMemoryCache } from "@apollo/client";
import { setContext } from "@apollo/client/link/context";
const httpLink = createHttpLink({
// replace this with content API endpoint
uri: process.env.API_ENDPOINT,
});
const authLink = setContext((_, { headers }) => {
return {
headers: {
...headers,
// replace this with the permanent authorization token copied above
authorization: `Bearer ${process.env.AUTH_TOKEN}`,
},
};
});
const client = new ApolloClient({
link: authLink.concat(httpLink),
cache: new InMemoryCache(),
});
export default client;

Use the GraphQL client's query function with the gql expression to query the blog posts. Notice how you can select different fields based on the application requirements. For example, the code below requests only the title field in the blogContent remote source field of published blog posts.

import client from "../../apollo-client";
import { gql } from "@apollo/client";
async function getPublishedBlogPosts() {
const { data } = await client.query({
query: gql`
query getBlogBySlug {
blogPosts(stage: PUBLISHED) {
slug
blogContent {
title
}
}
}
`,
});
return data
}

You can easily fine tune the required fields in the gql query to suit your client's needs.

To add a new blog post, use the GraphQL client’s mutate function. The following example creates a new post and publishes the newly created blog post:

import client from "../../apollo-client";
import { gql } from "@apollo/client";
async function createAndPublishBlog(slug) {
const { data } = await client.mutate({
mutation: gql`
mutation createBlogPost($slug: String) {
createBlogPost(data: { slug: $slug }) {
id
}
}
`,
variables: {
slug,
},
});
return await client.mutate({
mutation: gql`
mutation publishBlogPost($id: ID) {
publishBlogPost(to: PUBLISHED, where: { id: $id }) {
slug
}
}
`,
variables: {
id: data.createBlogPost.id,
},
});
}

#Conclusion

You've successfully built a BFF using Hygraph. In doing so, you've learned about content modeling, federation, and distribution with Hygraph, as well as how to secure this content. You've also learned about GraphQL and its advantages for data fetching, and how to use GraphQL to serve content from Hygraph as a BFF.

You can extend the example above to add more remote sources for blogs, such as Forem's DEV API. You can also collect the likes from all blogging platforms, store them in the blog post, and serve them from Hygraph to your blog.

Hygraph is a federated content platform with an intuitive data modeling and distribution API. It offers localization, remote sources, digital asset management, and many other features straight out of the box. Its globally distributed CDN makes it highly performant for serving both assets and information. Sign up for a free account today to get started.

Blog Author

Anshuman Bhardwaj

Anshuman Bhardwaj

Anshuman is a seasoned software engineer who loves writing and teaching. A craftsman of React and JavaScript, he enjoys solving everyday problems with code and sharing his learnings with the world.

Share with others

Sign up for our newsletter!

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