Join us from October 8-10 in New York City to learn the latest tips, trends, and news about GraphQL Federation and API platform engineering.Join us for GraphQL Summit 2024 in NYC
Docs
Start for Free

Get Started with Cloud Dedicated

Create your first Dedicated cloud router


Cloud is currently in invite-only preview. Don't hesitate to get in touch if you'd like to request access or have any questions or feedback.

Follow this hands-on guide to create a new that uses a Dedicated . To learn about Dedicated cloud routing in general, go to the Cloud Dedicated overview.

Prerequisites

To complete this quickstart, you must have the following:

  • A GraphOS Studio account
  • An organization with the get in touch to request access.
  • One or more APIs that Apollo can access. That means you must either:
    • Make your GraphQL API(s) available via a publicly accessible URL, for example, https://api.mycompany.com/subgraphA
    • Keep your GraphQL API(s) private but allow secure connections, for example, via VPC networking

If you have multiple , each needs to be exposed to Apollo. Your , however, should only be publicly accessible via your cloud router.

NOTE

In a supergraph, each GraphQL API is called a subgraph. Apollo refers to these GraphQL APIs as subgraphs, even if you only connect one GraphQL API.

The doesn't supported nested federation—that is, a cannot act as a supergraph for another set of subgraphs.

Step 1. Create a new graph

To provision a new Dedicated cloud router, you must first create a new graph in GraphOS Studio. To do so, click Create New Graph from the Graphs tab.

Graphs tab in GraphOS Studio

Step 2. Connect APIs

  1. Next, connect your GraphQL API to Apollo.

    • If your API URL is publicly accessible, enter the API URL. This URL is the URL that client applications currently use to your API.
    • If your API isn't publicly accessible and requires private networking, you can connect to it with AWS VPC Lattice. Select My endpoint isn't publicly accessible to connect a VPC. Follow the prompts to complete setup.
  2. Enter a Subgraph name. The name should reflect your API's data or capabilities and uniquely identify your API among any other APIs you might add to the supergraph later.

    NOTE

    The subgraph name is immutable.

  3. Select the backend provider and region to deploy your cloud router in.

  4. Optionally, configure headers, secrets, CORS rules, or other configurations. You can always update your router configuration as needed.

  5. Provide a Supergraph name and ID.

    • The supergraph name is displayed throughout Studio and helps your team distinguish between your graphs. You can change your graph's name at any time.
    • The ID is immutable and must be unique across all of Apollo. Ensure it starts with a letter and contains only letters, numbers, and dashes. You'll use the ID to reference your graph from various tools, such as the .
  6. Click Create GraphOS Router.

Provisioning a for your new supergraph may take a few moments. Once done, click Query your supergraph to open the Explorer and begin playing with your graph, or Open README to go to your graph's landing page.

Before moving to the next step, add any other GraphQL APIs you want to connect. Open the Subgraphs page from the left navigation and click Add a subgraph.

The 'Add a subgraph' button in the subgraphs page in GraphOS Studio

Every router configuration or change—including adding a subgraph—triggers a new launch. Every automatically deploys new cloud router instances for your supergraph.

NOTE

The launch process typically takes 1-2 minutes but may take up to 5 minutes. During the process, Apollo provisions new and swaps them in once they're online. Deployments minimize API degradation and downtime.

Step 3. Inspect and configure your cloud router

Dedicated have a separate UI for management and configuration. Open the Cloud Router page from the left navigation. This page shows a summary of your cloud router, including its API endpoint and API details.

Use the Configuration tab to manage your cloud router's configuration, including Secrets and Router configuration YAML. See the router docs for more information.

The Cloud Router page in GraphOS Studio

Step 4. Test and validate

To test whether your graph works as intended, run a sample query by clicking Run in Explorer from your graph's Overview page.

Enable subgraph error reporting if you run into issues.

For further testing, you can add to your graph for development or staging environments. To do so, go to Settings > This Graph > Variants and click Add a variant.

Apollo recommends running a load test to determine how much throughput capacity you need to run your graph.

Step 5. Go live

Your supergraph is ready to start receiving client ! If you have existing client applications that connect directly to your GraphQL API, you can update their GraphQL endpoint URL to your router's URL.

Similarly, any new client applications should use your router's URL.

NOTE

  • For all browser-based clients, make sure their origin is allowed in your router's CORS rules.

  • Only update clients that communicate with the correct instance of your GraphQL API. For example, if your API has staging and production instances, only update clients that communicate with the instance used by this supergraph .

Router endpoint URL

You can find your endpoint URL on the Overview page under the graph's in .

A cloud router's endpoint displayed on the Cloud Router page in GraphOS Studio

NOTE

By default, cloud router URLs are on a subdomain of apollographos.net. You can setup a custom domain to minimize client-side changes.

Next steps

Congratulations! 🎉 You've built a cloud supergraph on GraphOS. Check out the Next steps article for some of the most common and important actions to perform on your supergraph, including updating your subgraph's schema and setting up continuous delivery.

Previous
Overview
Next
Throughput Guide
Rate articleRateEdit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc., d/b/a Apollo GraphQL.

Privacy Policy

Company