Get Started with Cloud Dedicated
Create your first Dedicated cloud router
Follow this hands-on guide to create a new graph that uses a Dedicated cloud router. 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 Dedicated plan—get in touch to request access.
One or more GraphQL 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 subgraphs, each needs to be exposed to Apollo. Your supergraph, however, should only be publicly accessible via your cloud router.
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.
Step 2. Connect APIs
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 query 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 private subgraph setup.
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.
noteThe subgraph name is immutable.Select the backend provider and region to deploy your cloud router in.
Optionally, configure headers, secrets, CORS rules, or other configurations. You can always update your router configuration as needed.
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 Rover CLI.
Click Create GraphOS Router.
Provisioning a router 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.
Every router configuration or supergraph schema change—including adding a subgraph—triggers a new launch. Every launch automatically deploys new cloud router instances for your supergraph.
Step 3. Inspect and configure your cloud router
Dedicated cloud routers 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.
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 README page.
Enable subgraph error reporting if you run into issues.
For further testing, you can add variants 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 operations! 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.
- 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 variant.
Router endpoint URL
You can find your endpoint URL on the Cloud router page in GraphOS Studio.
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 general Quickstart's Next steps for some of the most common and important features to learn about.