Skip to content

Commit f35b768

Browse files
committed
Apply Benjie's feedback
1 parent c31a7aa commit f35b768

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

src/pages/learn/federation.mdx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ sidebarTitle: Federation
44

55
import { Tabs } from 'nextra/components'
66

7-
# GraphQL Federation
7+
# GraphQL federation
88

99
As applications grow more complex, traditional monolithic approaches often fall short. At scale,
1010
monolithic architectures can become cumbersome, brittle, and increasingly hard to test and validate.
1111
This has led to a rise in the adoption of new patterns like distributed systems and microservices.
12-
In some ways, GraphQL Federation is like microservices for GraphQL an architectural pattern that
12+
In some ways, GraphQL federation is like microservices for GraphQL - an architectural pattern that
1313
has found particular resonance in the GraphQL ecosystem.
1414

15-
GraphQL Federation gained widespread adoption after
15+
GraphQL federation gained widespread adoption after
1616
[Apollo GraphQL introduced Apollo Federation in 2019](https://www.apollographql.com/blog/apollo-federation-f260cf525d21).
1717
Their implementation has become a reference point for the GraphQL community, helping establish
1818
federation as a standard architectural pattern for building a distributed graph in the GraphQL
1919
ecosystem.
2020

21-
With more companies and developers seeing the benefits of building a distributed graph with
21+
With more companies and developers seeing the benefits of building a distributed GraphQL schema with
2222
federation, the GraphQL ecosystem is now moving towards standardization of federation patterns. The
2323
GraphQL Foundation's
2424
[Composite Schema Working Group](https://github.com/graphql/composite-schemas-wg), which includes
@@ -50,14 +50,14 @@ Think of the "Login with Google" or "Login with Facebook" buttons you see on web
5050
federation in action: you can use your Google or Facebook account to log into many different
5151
websites, even though each company manages their own login system separately.
5252

53-
## What Is Federated GraphQL?
53+
## What is federated GraphQL?
5454

55-
GraphQL Federation applies those principles to GraphQL APIs. It enables organizations to build a
55+
GraphQL federation applies those principles to GraphQL APIs. It enables organizations to build a
5656
unified GraphQL schema from multiple independent services (most often called subgraphs), each
5757
responsible for its portion of the application's data graph.
5858

5959
Consider an e-commerce platform: You might have separate teams managing products, user accounts, and
60-
order processing. With GraphQL Federation, each team can:
60+
order processing. With GraphQL federation, each team can:
6161

6262
- Define their own GraphQL schema
6363
- Deploy and scale their service independently
@@ -67,7 +67,7 @@ order processing. With GraphQL Federation, each team can:
6767
The magic happens through a federated gateway that acts as the central coordinator, composing these
6868
separate schemas into a unified schema that clients can query.
6969

70-
## How Federation Works in GraphQL
70+
## How federation works in GraphQL
7171

7272
The federation process involves several key components:
7373

@@ -122,7 +122,7 @@ type Order {
122122

123123
</Tabs.Tab> </Tabs>
124124

125-
### Schema Composition
125+
### Schema composition
126126

127127
Let's break down schema composition in GraphQL federation with more detail and examples. Schema
128128
composition is the process where multiple subgraph schemas are combined into one unified schema.
@@ -205,58 +205,58 @@ query {
205205
The gateway will route parts of the query to the appropriate subgraphs, collect the results, and
206206
assemble them into a single response that the client can consume.
207207

208-
## Benefits of GraphQL Federation
208+
## Benefits of GraphQL federation
209209

210-
### Domain-Driven Development
210+
### Domain-driven development
211211

212212
Teams can work independently on their services while contributing to a cohesive API. This autonomy
213213
accelerates development and reduces coordination overhead.
214214

215-
### Service Integrity Protection
215+
### Service integrity protection
216216

217217
The schema composition step verifies integration between services by ensuring that changes in
218218
individual subgraphs do not conflict with other subgraphs.
219219

220-
### Scalability and Performance
220+
### Scalability and performance
221221

222222
Subgraphs and services can be scaled independently based on their specific requirements. The product
223223
catalog might need different scaling characteristics than the order processing system.
224224

225-
### Single, Unified API
225+
### Single, unified API
226226

227227
Thanks to GraphQL, clients get a single endpoint with unified schema spanning multiple subgraphs.
228228
The complexity of distributed systems is hidden. The gateway ensures every query reaches its
229229
destination and returns with the right data.
230230

231-
## Is GraphQL Federation Right for You?
231+
## Is GraphQL federation right for you?
232232

233-
GraphQL Federation aligns naturally with Domain Driven Design (DDD) principles by allowing teams to
233+
GraphQL federation aligns naturally with Domain Driven Design (DDD) principles by allowing teams to
234234
maintain clear boundaries around their domains, while maintaining explicit integration points
235235
through the GraphQL schema. It is particularly valuable for organizations where multiple teams need
236236
to work independently on different parts of the GraphQL API, with the flexibility to use different
237237
technologies and programming languages.
238238

239-
However, implementing Federation requires substantial infrastructure support, including a dedicated
239+
However, implementing federation requires substantial infrastructure support, including a dedicated
240240
team to manage the gateway, schema registry, to help connect subgraphs to the federated API and guide
241241
teams on best practices.
242242

243-
Before adopting Federation, it's crucial to consider whether your organization truly needs this
243+
Before adopting federation, it's crucial to consider whether your organization truly needs this
244244
level of complexity.
245245

246246
Meta (formerly Facebook), [where GraphQL was created](/blog/2015-09-14-graphql/), has continued to
247247
use a monolithic GraphQL API since 2012. However, companies like
248248
[Netflix](https://netflixtechblog.com/how-netflix-scales-its-api-with-graphql-federation-part-1-ae3557c187e2),
249249
[Expedia Group](https://youtu.be/kpeVT7J6Bsw?si=srGWsoxf3kTmneTu&t=79),
250250
[Volvo](https://www.apollographql.com/blog/volvo-cars-drives-into-the-future-of-online-car-shopping-with-the-supergraph),
251-
and [Booking](https://youtu.be/2KsP_x50tGk?si=mu-MOG-xZQSDNDjh&t=478) have adopted Federation to
251+
and [Booking](https://youtu.be/2KsP_x50tGk?si=mu-MOG-xZQSDNDjh&t=478) have adopted federation to
252252
better align with their organizational structures and microservices architecture.
253253

254-
As you see, many industry leaders successfully federated their GraphQL APIs, proving that it works
255-
reliably for large-scale production applications.
254+
As you see, some of the world's largest industry leaders have successfully federated their GraphQL APIs,
255+
proving that it works reliably for production applications at an extraordinary scale.
256256

257-
## Getting Started with GraphQL Federation
257+
## Getting started with GraphQL federation
258258

259-
If you're considering adopting GraphQL Federation, here are some steps to get started:
259+
If you're considering adopting GraphQL federation, here are some steps to get started:
260260

261261
1. **Identify Service Boundaries**: Define clear boundaries between different domains in your
262262
application
@@ -269,6 +269,6 @@ If you're considering adopting GraphQL Federation, here are some steps to get st
269269
5. [**Use a Schema Registry**](/community/tools-and-libraries/?tags=schema-registry 'Discover a list of GraphQL schema registries in our Tools and Libraries page'):
270270
Manage schema composition and validation to ensure integrity across subgraphs
271271

272-
When migrating from a monolithic GraphQL API to Federation, the simplest starting point is to treat
272+
When migrating from a monolithic to federated GraphQL API, the simplest starting point is to treat
273273
your existing schema as your first subgraph. From there, you can follow the steps above to gradually
274274
decompose your schema into smaller pieces.

0 commit comments

Comments
 (0)