Files
system-design-101/data/guides/graphql-adoption-patterns.md
Kamran Ahmed ee4b7305a2 Adds ByteByteGo guides and links (#106)
This PR adds all the guides from [Visual
Guides](https://bytebytego.com/guides/) section on bytebytego to the
repository with proper links.

- [x] Markdown files for guides and categories are placed inside
`data/guides` and `data/categories`
- [x] Guide links in readme are auto-generated using
`scripts/readme.ts`. Everytime you run the script `npm run
update-readme`, it reads the categories and guides from the above
mentioned folders, generate production links for guides and categories
and populate the table of content in the readme. This ensures that any
future guides and categories will automatically get added to the readme.
- [x] Sorting inside the readme matches the actual category and guides
sorting on production
2025-03-31 22:16:44 -07:00

40 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 'GraphQL Adoption Patterns'
description: 'Explore 4 popular GraphQL adoption patterns for your team.'
image: 'https://assets.bytebytego.com/diagrams/0208-graphql-adoption-patterns.png'
createdAt: '2024-02-13'
draft: false
categories:
- api-web-development
tags:
- GraphQL
- API
---
![](https://assets.bytebytego.com/diagrams/0208-graphql-adoption-patterns.png)
Typically, teams begin their GraphQL journey with a basic architecture where a client application queries a single GraphQL server.
However, multiple patterns are available:
* **Client-based GraphQL**
The client wraps existing APIs behind a single GraphQL endpoint. This approach improves the developer experience but the client still bears the performance costs of aggregating data.
* **GraphQL with BFFs**
BFF or Backend-for-Frontends adds a new layer where each client has a dedicated BFF service. GraphQL is a natural fit to build a client-focused intermediary layer.
Performance and developer experience for the clients is improved but theres a tradeoff in building and maintaining BFFs.
* **The Monolithic GraphQL**
Multiple teams share one codebase for a GraphQL server used by several clients. Also, a single team owns a GraphQL API that is accessed by multiple client teams.
* **GraphQL Federation**
This involves consolidating multiple graphs into a supergraph.
GraphQL Federated Gateway takes care of routing the requests to the downstream subgraph services that take care of a specific part of the GraphQL schema. This approach maintains ownership of data with the domain team while avoiding duplication of effort.
Over to you: Which GraphQL adoption approach have you seen or used?