VOOZH about

URL: https://thenewstack.io/graphql-break-free-of-backend-for-frontend-sprawl/

⇱ GraphQL: Break Free of Backend-for-Frontend Sprawl  - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2023-07-13 10:57:21
GraphQL: Break Free of Backend-for-Frontend Sprawl 
sponsor-apollo-graphql,sponsored-post-contributed,
Data / Frontend Development / Operations

GraphQL: Break Free of Backend-for-Frontend Sprawl 

A federated GraphQL structure allows a company to focus on features that drive revenue and avoid wasting resources to maintain a top-heavy tech stack.
Jul 13th, 2023 10:57am by Aditya Gune
👁 Featued image for: GraphQL: Break Free of Backend-for-Frontend Sprawl 
Apollo GraphQL sponsored this post. Insight Partners is an investor in Apollo GraphQL and TNS.

The backend-for-frontend (BFF) pattern is popular among engineering teams to abstract backend services away from clients. But as your product starts to scale to accommodate more customers and their needs across mobile clients and other platforms, the strain begins.

Suddenly, your organization has a case of “BFF sprawl” on its hands. It is entirely possible for enterprises to have dozens of BFFs they suddenly have to maintain.

BFF sprawl is a dangerous state for an engineering organization to be trapped in. There is a risk of frequent service outages as your team is stretched between building new features and addressing the ballooning tech debt. Worst case, your architecture becomes a web of BFF services with duplicate code and a backlog of interdependent maintenance tasks. All this typically happens when the company desperately needs to scale product up and out quickly to meet customer demand and drive the business to its next phase.

👁 Image

BFFs are effective at serving a small number of clients (left), but faced with a large set of clients with diverse requirements (right), they can quickly become difficult to build and maintain.

GraphQL helps software teams deliver features faster, and the Apollo GraphOS platform helps teams deliver GraphQL at scale, across any number of clients and services. Insight Partners is an investor in Apollo GraphQL and TNS.
Learn More
The latest from Apollo GraphQL

Self-Service Data Fetching with GraphQL

BFFs are really just REST APIs that orchestrate calls to other backend APIs and serve as gateways to highly distributed systems. Faced with a BFF layer that may expand rapidly in both size and complexity, teams often turn to open source GraphQL to manage API queries for client applications. Rather than the BFF service dictating the data contract, GraphQL provides service developers with a declarative schema definition language (SDL) to define entities and the relationship between them within a schema. Any number of client teams can use a declarative query language and a single endpoint to request only the data they need in a self-service fashion.

But as GraphQL usage grows across an organization, it can be hard to maintain in a scalable, self-service way. Companies will typically build a monolithic GraphQL API that can expand with the business’ needs, but it can become overloaded and cause performance bottlenecks that negate many of its benefits.

A web of multiple GraphQL APIs presents the same problems the BFF architecture did by becoming difficult to maintain while unnecessarily duplicating code and leading to costly overlaps in infrastructure investment. This also presents issues for security and site reliability engineering (SRE) teams, as it becomes difficult to enforce policies and monitor performance with every change to every GraphQL schema.

To avoid these pitfalls, engineering organizations need a solution that leverages the flexibility and power of GraphQL but that can still serve as a “data gateway.” The solution must allow organizations to abstract the microservice layer away from the client applications it serves. It must also be capable of serving a large number of clients with a diverse set of requirements.

Implementing GraphQL at Scale

A federated GraphQL implementation has been shown to help solve the BFF sprawl problem. A federated GraphQL API implementation replaces the BFF layer with distinct GraphQL APIs that different teams can own. The single API implementation allows requests to be routed through a composition layer that can compose a query across multiple GraphQL APIs at runtime. Less latency and improvements in flexibility are among the immediate benefits when replacing a large BFF or monolithic GraphQL layer with a single federated GraphQL API.

👁 Image

A single endpoint that can fetch data from any number of services

A federated approach delivers the simplicity of a monolith for client teams, but the agility of a decoupled approach for service teams. Different teams can define and maintain their own graphs without running the risk of breaking existing infrastructure. New application features can be created at the same velocity a BFF architecture allows. However, the time spent on monitoring and maintenance is reduced because the graphs are contained in a single GraphQL API.

The federated graph paradigm also encourages maintainability and service health. GraphQL’s use of evolving schemas rather than versioned API structures means you never have to worry about rolling out major releases when a client’s requirements change. The federated graph model means changes by a team to one graph place minimal load on other teams who own other graphs.

By contrast, in a BFF or a monolithic GraphQL model, any change to the BFF or graph layer has the potential to bring down service to that client, affecting multiple teams.

Less Complexity

Engineering leaders are often risk-averse to large changes to the architecture. The idea of introducing a complex federated graph architecture with potential stability implications just to serve as an abstraction layer sounds like an anti-pattern at first. But the tradeoff in complexity from adopting a federated GraphQL structure is not as large as it seems.

The reality is that for tech organizations facing BFF sprawl or a GraphQL explosion, those anti-patterns are already in effect. If your systems are highly distributed (such as in a microservice environment), your BFF layer is most likely already doing the job of federating your microservice data and composing it into a shape consumable by your clients. But because of the constraints inherent in REST APIs, it comes with a larger data contract than the client often needs — and a higher maintenance footprint in turn.

By contrast, a federated graph paradigm accomplishes the same result but with reduced infrastructure and engineering investment. This also means fewer internal debates on how best to maintain esoteric or sprawling architectures, which distract from the product-building mission, and more focus on how the technology can serve customers and drive revenue for the company.

Rather than building out a web of BFF APIs that require their own containerization, CI/CD and orchestration pipelines, the organization can build a single GraphQL API with centralized monitoring and one set of SRE resources.

Work Small to Big

Netflix serves as an example of a large organization that relies on a federated GraphQL implementation to solve its API aggregation-layer challenges. While Netflix shows what is possible, not every company can dedicate that level of technical resources to build its own ecosystem as Netflix has done. Typically, the code used to implement the GraphQL API and compose the data schemas from the graphs has to be written and owned purely by the company’s developers.

Smaller organizations and startups should thus seek solutions to make the conversion easier by providing a flexible federated GraphQL solution that can be quickly deployed and easily supported by engineering teams.

An option such as Apollo Federation can serve as an abstraction layer capable of combining different graph schemas into a “supergraph.” The platform consists of multiple “subgraphs” — the GraphQL graphs that teams would normally write. It also makes use of a “router,” which receives queries from the client and composes different subgraphs to form the appropriate data schema.

The Apollo Router offers a pre-compiled runtime that can fit into the router component of Apollo Federation. According to Apollo’s benchmarks, latencies are 10 milliseconds or less for high-traffic production environments. Both Apollo Federation and Apollo Router have been shown to provide flexibility and increased performance while reducing the costs of implementing the federated GraphQL paradigm.

A federated GraphQL platform that meets the needs of small-, medium- and large-sized organizations should allow architects to define the relationship between graphs, but without the need to spend the time writing and testing code to compose those graphs. In this way, frontend engineers can focus on writing client-level business logic and enriching the user experience.

Backend engineers can focus on writing core service logic and ensuring the product scales well instead of struggling to maintain an increasingly complicated BFF or monolithic GraphQL layer. And SREs and infrastructure teams can advance their own initiatives such as improving security, observability or taking on projects such as shifting to Kubernetes rather than worrying about the health of the BFF layer.

Ultimately, the goal of any architecture is to best serve the product by delivering value to the customer and the business. Keeping the product and tech stacks healthy by reducing complexity, limiting sprawl and carefully managing infrastructure investments is a top priority for startups whose product is beginning to scale.

Replacing an expansive BFF layer or a large and monolithic GraphQL setup with a federated structure allows the company to improve its focus on features that drive revenue. This also helps the organization to avoid having to waste resources on the painful maintenance of a top-heavy tech stack.

GraphQL helps software teams deliver features faster, and the Apollo GraphOS platform helps teams deliver GraphQL at scale, across any number of clients and services. Insight Partners is an investor in Apollo GraphQL and TNS.
Learn More
The latest from Apollo GraphQL
TRENDING STORIES
Aditya Gune works with ReveCom Media Inc. as a writer and analyst and is a software engineer at Jetty. He has a Master's degree in computer science from Oregon State University and almost a decade of experience building software, including...
Read more from Aditya Gune
Apollo GraphQL sponsored this post. Insight Partners is an investor in Apollo GraphQL and TNS.
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Apollo GraphQL, Pragma.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
👁 Image
Platform Engineering for APIs: Using GraphQL to Drive Developer Efficiency