Apollo GraphQL products for dummies
Tags: graphql, apollo, programming, beginners
Published: 2023-12-28 20:05:04

## What question does this article answer?
This article aims to help you understand what [Apollo products](https://www.apollographql.com/) are available and distinguish between the free and paid options.

## Prerequisites
- Familiarity with [GraphQL](https://graphql.org/)
- Awareness of [Apollo Server](https://www.apollographql.com/docs/apollo-server/) and [Federation](https://www.apollographql.com/docs/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


![Gateway_analogy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rcuebpwv25x5jtcfiulm.png)

## What is the difference between Apollo Gateway and Router?
[Apollo Gateway](https://www.apollographql.com/docs/apollo-server/using-federation/apollo-gateway-setup) is essentially [Apollo Server](https://www.apollographql.com/docs/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](https://www.apollographql.com/docs/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](https://www.apollographql.com/docs/react)

## Anything more?
Certainly! There are two tools to assist with development:
- GraphQL Playground (deprecated)
- [Apollo Sandbox](https://www.apollographql.com/docs/graphos/explorer/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](https://www.apollographql.com/docs/graphos/routing/cloud) 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](https://www.apollographql.com/docs/graphos/metrics).

The second paid product is [Managed Federation](https://www.apollographql.com/docs/federation/managed-federation/overview). It consist of Schema Registry (a service that combines subgraphs into a supergraph, ensuring compatibility) and [Uplink](https://www.apollographql.com/docs/federation/managed-federation/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

![Apollo_products](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4uvpic9bghfpfleof2vo.png)