What question does this article answer?
This article aims to help you understand what Apollo products are available and distinguish between the free and paid options.
Prerequisites
- Familiarity with GraphQL
- Awareness of Apollo Server and Federation.
Let's rock
If you're new to GraphQL, you've probably heard of Apollo GraphQL. They're a company that makes tools for GraphQL, some of which are free and some you have to pay for. I was confused at first about which ones to use and if I had to pay. In this article, I'll share what I figured out and my thoughts on Apollo's tools.
Before we dive into the products, let's talk about Apollo's standout feature - Apollo Federation. The tricky part for me was understanding what it actually is. Even the official documentation starts with the problem it solves, but not a clear definition. Some say it's an architecture model, but it's way more than just a diagram. It expands the GraphQL schema and introduces new terms like subgraph, supergraph, router, and gateway...
- So, what is Apollo Federation?
- I would say it is an implementation of GraphQL Federation.
- Alright, what is GraphQL Federation then?
- Think of it like an API Gateway that brings together all the microservices using GraphQL, similar to how an API Gateway combines microservices with REST APIs into one place.
In the context of an API Gateway, Apollo Federation needs a dedicated service as the entry point for clients. Apollo provides 2 options for that:
- Apollo Gateway
- Apollo Router
What is the difference between Apollo Gateway and Router?
Apollo Gateway is essentially Apollo Server just with a slightly different setting, written in Typescript.
P.S. Apollo Server is an open-source, spec-compliant GraphQL server
Apollo Router is suggested for production. It's written in Rust, potentially offering better performance, but making changes may demand more effort from your team.
The great news is that all the technologies I've mentioned - Apollo Federation, Apollo Server/Gateway, and Apollo Router - are free to use.
Anything else free for us?
Apollo provides free GraphQL clients, whether you're using Federation or not, there's no difference for the clients. These clients include an internal cache to lighten the load on your application.
Example: React Client
Anything more?
Certainly! There are two tools to assist with development:
- GraphQL Playground (deprecated)
- Apollo Sandbox
You can think of them like Swagger or Postman (btw, you can use Postman instead of all these tools).
Alright, what about the not-so-free stuff?
Firstly, there's the Cloud Router from Apollo, which eliminates the need for a separate service to handle requests, but it comes with a cost based on the number of requests. Also, it provides the benefit of collecting metrics and statistics.
The second paid product is Managed Federation. It consist of Schema Registry (a service that combines subgraphs into a supergraph, ensuring compatibility) and Uplink (a service that stores the current supergraph).
Cloud and self-hosted Routers seamlessly work with Managed Federation, fetching a new supergraph automatically unlike the free solutions that require a restart after updating a subgraph.
Apollo Studio, a web UI, lets you manage these paid products. To use the studio, create a GraphOS account and choose a subscription.
So let's wrap up
Top comments (0)