Docs
Launch GraphOS Studio

The Apollo GraphOS platform

Unify your infrastructure with GraphQL


is the platform for building, managing, and scaling a supergraph: a unified network of your organization's microservices and their —all composed into a single distributed API.

With one to your 's router, an application client can fetch data from any combination of your services:

Your infrastructure
GraphOS
Sub-query
Sub-query
Query
Users
API
Products
API
Graph
Router
Clients

Clients query your supergraph with a powerful language called

, which enables them to retrieve exactly the data they need, with no overfetching. Your supergraph's architecture is not exposed—clients send queries to a single endpoint (your ), no matter what data they need.

The supergraph is not a replacement for your existing infrastructure. Instead, it's a methodology for interconnecting your existing infrastructure, to make it more accessible and useful for everyone who interacts with your data.

What's in GraphOS?

The platform provides an ever-growing collection of tools and services to help you build your supergraph and scale it safely alongside your organization.

These features are core to GraphOS:

  • Cloud routing
    • GraphOS automatically provisions and hosts a router for each of your . Clients query your router instead of your individual services (also called ). This enables the router to automatically collect metrics that you can then visualize in .
  • The schema registry
    • GraphOS tracks the schemas for all your APIs, and it also handles composing those schemas into one for your router.
  • Safe
    • The
      schema checks
      feature of GraphOS enables you to verify whether proposed changes to one of your services will cause an issue with other services, or with any of your existing clients.
    • Whenever you update a service's schema, GraphOS composes a new supergraph schema for your router. If succeeds, your router automatically begins using its new schema.
    • You can view the results of each
      launch
      that takes place whenever you update a service's schema, helping you resolve any issues that might occur.
  • An interface for every use case

To learn more about these and many more GraphOS features, see the

.

What's in a supergraph?

If GraphOS is the platform for building and managing supergraphs, it's important to understand what's in a supergraph.

Every supergraph uses an open architecture called

, which consists of the following parts:

Your infrastructure
GraphOS
GraphQL API
A
GraphQL API
B
Graph
Router
Clients

  • The router
    • The graph router serves as the client-accessible entry point to your supergraph. It receives all incoming queries.
    • As its name suggests, the router "routes" each incoming query to the appropriate combination of subgraphs (see the next item). It's also responsible for combining multiple subgraph responses into a single response for the client.
    • GraphOS can take care of provisioning and hosting your supergraph's router for you.
  • One or more s
    • Your GraphQL APIs each contribute a subset of your supergraph's available data, so we call them subgraphs Clients don't query your subgraphs directly—only your router does.
    • Usually, each of your existing microservices acts as a different subgraph.
  • Backing data sources (databases, REST APIs, etc.)
    • Your subgraphs use these to populate data for incoming queries.

The diagram above shows a basic supergraph with a GraphOS-managed router, two subgraphs, and two corresponding data sources.

The following video provides a helpful visualization of how the architecture helps organizations scale with their data:

Why adopt a supergraph?

Adopting a supergraph significantly improves the developer experience for every team (both internal and external) that interacts with your organization's data. These improvements enable developers to ship products and features more quickly, with greater confidence in their reliability and performance.

How do I implement a supergraph?

To implement a supergraph, you set up its

: the graph router and your subgraphs. Apollo provides libraries and tools for setting up each part. And more importantly, we provide tutorials to help you.

Tutorials

  • If you're new to GraphQL, we recommend starting your supergraph journey with the
    Lift-off tutorial series
    .
    • Familiarizing yourself with fundamental GraphQL concepts is an important prerequisite to getting the most out of your supergraph.
  • If you're already using GraphQL, we recommend jumping in with your first supergraph.
    See the quickstart.

Implementing the router

If you

with GraphOS, Apollo provisions and hosts your supergraph's router for you.

For enterprise organizations that need to run their router in their own infrastructure, Apollo provides two libraries that can act as a router:

  • The Apollo Router
    (strongly recommended)
    • This is a high-performance binary written in Rust that adds
      minimal latency to request processing
      , even with extremely high traffic.
    • Because the is a precompiled binary, you don't need to write any boilerplate code around it to deploy it to your backend. All it needs is a configuration file for any behavior you want to customize.
    • Cloud supergraph use the Apollo Router under the hood.
  • Apollo Server
    with @apollo/gateway
    • This is Apollo's open-source Node.js library, which you can configure to act as a supergraph gateway.

If you get started with one of these libraries and later decide to switch to the other, you can do so without making any changes to the rest of your supergraph.

Implementing subgraphs

Each subgraph is itself a GraphQL API. Therefore, it uses a GraphQL server library to handle queries forwarded along by your graph router.

To act as a subgraph, a GraphQL server library needs to support the Apollo Federation subgraph specification. Fortunately, many popular libraries do. See

.

Feel free to use whichever server library best suits your organization. Different subgraphs can even use completely different libraries, which is helpful if your various microservices use different languages.

How do clients query my supergraph?

To client applications, your supergraph appears the same as any other GraphQL API. Therefore, they query it with the same client libraries.

Apollo provides libraries for the following platforms:

These are all customizable, open-source libraries with powerful caching and state management features. Client-side caching enables an application to locally replicate the parts of your supergraph that it cares about. The application can then query itself for data if it's already present, which dramatically improves performance by eliminating redundant network requests.

Where do I start?

We have loads of helpful resources to help you start your supergraph journey:

Looking for additional guidance? Share a question in our

and we'll help point you in the right direction.

Previous
Home
Next
Why adopt GraphQL?
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company