Set up your graph
Transform your REST APIs into a graph with GraphOS
Hello! 👋 This set of guides gets you up and running with a graph built on REST APIs.
A graph is network of interconnected data that enables clients to traverse relationships and fetch exactly what they need in a single request.
In this and the following guides, you will:
Set up a graph
Learn how to use Apollo's tools like GraphOS Studio, Rover CLI and Apollo Sandbox
Let's start building!
POST
requests.Prefer to start with a high-level conceptual understanding? Check out the Apollo Connectors Overview.
🧰 Meet your tools
Throughout this guide you'll be using the following Apollo tools:
GraphOS Studio is the primary web interface for GraphOS. Studio helps you monitor, manage, and collaborate on your GraphQL APIs.
The Rover CLI is the primary command-line interface for GraphOS.
None of these tools requires a paid plan.
Create a GraphOS account
You need an account to work with GraphOS. Sign up for a Free plan at studio.apollographql.com.
Create a graph
If your organization hasn't created any graphs in Studio yet, Studio presents the following screen that encourages you to get started with the Rover CLI. Follow the instructions on the screen to install Rover and authenticate it with your GraphOS account. Then, under Select your starting point, click Connect a REST API.
If you already have existing graphs, you won't see this screen, but it's still helpful to start by installing Rover with the appropriate command for your system:
terminalMacOS / Unix-likecurl -sSL https://rover.apollo.dev/nix/latest | sh
terminalWindowsiwr 'https://rover.apollo.dev/win/latest' | iex
Then, click Add new graph on the upper right of the Studio homepage and select Connect a REST API.
Enter a graph title and graph ID and keep the defaults for the other form elements. Then click Create and continue.
Next, follow the instructions to set up your local development environment. You should end up with a
supergraph.yaml
andproducts.graphql
file in your local project.File overview- The
supergraph.yaml
specifies which Apollo Federation version to use and configures your subgraphs, the different services that make up your supergraph. - The
products.graphql
contains a GraphQL schema and defines your graph's structure, types, and capabilities. The schema is where you define Connectors and where this guide spends most of its time.
Once
rover dev
is running, your terminal should look something like this:terminalsupergraph config loaded successfully warning: Do not run this command in production! It is intended for local development only. ==> Watching products.graphql for changes WARN: Connector debugging is enabled, this may expose sensitive information. ==> your supergraph is running! head to http://localhost:4000 to query your supergraph successfully composed with version 2.10.0
The last step in the modal brings you back to this quickstart guide.
- The
🎉 Congratulations—you've successfully started a local development session where you can explore, develop, and publish updates to your graph!
Next steps
Here's where the fun begins. Jump over to the next guide to start developing your graph.