If you've spent any time with GraphQL, you're familiar with the power of the graph: the ability to tie data together, to draw connections, to build faster insights and power immersive experiences.
But what does all that mean for the process of building a graph, such as the one shown below?
From Customer
s to Order
s, Merchant
s to Stall
s—it doesn't matter what we're building. Our goal is the same: we want to leverage the connections between our objects, or nodes, to build a supercharged, seamless web of data—one that lets us pluck information from a dozen different sources (or more!) with a single query. But until now, we've lacked the tools to monitor usage and performance, validate changes, and safeguard what we've already built. We haven't been able to scale our graphs the way we want to.
Now we can think about our API in a different way: building piece-by-piece, with a gateway that validates, composes, and measures our changes every step of the way. GraphOS is platform built by Apollo that supports what YOU build in GraphQL. Here's how it works.
Spin up a new service, or use an existing GraphQL API. All you need to do is tell GraphOS where it's running, and what it should be called.
GraphOS inspects the API to find out more about its types and fields. After all, they contain the instructions for what can be queried, what kinds of data objects there are in the service, and how they relate to one another! This information is the API's schema, and GraphOS uses it to create the very first piece of your newborn graph. This piece is called a subgraph, because it's just one part in a bigger supergraph that can grow as large as you want.
And right away, your supergraph is ready to be queried for data—even if it consists of just one subgraph! That's because when you create a graph in GraphOS, you get a serverless cloud router right out of the box, with a single endpoint you can send all your queries to. When you add more subgraphs behind the scenes, nothing changes in the way you consume data. The router handles it all, from receiving the query, to locating the pieces it needs from each subgraph, and handing the entire bundle back to you.
Got another subgraph? Get it in there! The process is the same, which means you can have the next piece of your project up and running as part of your supergraph in no time. And with a single router endpoint ready to receive your queries, you can forget all about coordinating different services and piecing their responses together by hand.
Instead, focus on growing your graph. GraphOS provides the tools for every stage of your development process. Monitor your graph's traffic, validate new additions to your graph before they ship, and keep your user experience free of disruption.
Ready to try it out? Hop on over to Apollo GraphOS Studio, or get hands-on with Odyssey's GraphOS: Basics tutorial.
When you sign up for a GraphOS Enterprise account, you can take the power of the Apollo Router into your own environment. You keep the power of a central API gateway powered on GraphOS, but the controls are in your hands: explore external coprocessors that hook into the router's lifecycle, configure persisted queries, create schema subsets, set operation limits, and lots more.
Try out an Enterprise trial here.
About
GraphQL.com is maintained by the Apollo team. Our goal is to give developers and technical leaders the tools they need to understand and adopt GraphQL.
GraphQL.com 2023