4. Creating a supergraph in GraphOS
2m

Overview

In this lesson, we'll create a cloud-hosted in ! We'll be using (the web interface) to get started.

You'll need a account with the Serverless plan.

Create a new supergraph

If this is your first time on Studio, then you'll see a page that looks like this:

https://studio.apollographql.com

Welcome page for creating a supergraph

Click on the Connect your GraphQL API button.

Step 1: Your GraphQL API

The first thing we need is the endpoint URL of our API. Let's paste it in.

Endpoint URL
https://poetic-plates-recipes-api.herokuapp.com/

Next, the name. It should be clear and simple. We could name it "Poetic Plates", the same name we've been calling our API so far. But are usually focused on a specific business domain, and this one is focused on content about recipes, so that would be a better name to use!

Subgraph name
recipes
https://studio.apollographql.com

Step 1 of supergraph creation with the URL and name filled out

Remember, this will become the first of our !

Hit Next.

Step 2: Supergraph

On this step, we'll pick a short ID and a name for our .

The ID will be used to reference your supergraph from various tools later on. It CANNOT be changed, so let's make sure to pick a good one!

The name however, you can change at any time. It's displayed throughout Studio and it's usually how you refer to your supergraph with your teammates.

https://studio.apollographql.com

Step 2 of supergraph creation with the ID and name filled out

In our case, we're going to go with the name "Poetic Plates". The ID will be named similarly.

Alright, let's hit Create Supergraph.

It'll take just a few moments for to provision and host the for us.... and now we're cooking!

https://studio.apollographql.com

Modal shows that the supergraph is ready to query

Task!

Key takeaways

  • To create a , you need your API endpoint. This becomes the first of your supergraph.
  • takes care of provisioning and hosting the for you.
  • We recommend keeping names clear and simple. Each should describe the domain it's focused on.

Up next

That was a piece of cake! With our set up, we're ready to start sending it queries!

Previous

Share your questions and comments about this lesson

Your feedback helps us improve! If you're stuck or confused, let us know and we'll help you out. All comments are public and must follow the Apollo Code of Conduct. Note that comments that have been resolved or addressed may be removed.

You'll need a GitHub account to post below. Don't have one? Post in our Odyssey forum instead.