Odyssey

GraphOS: From Development to Launch

Workshop introFollow-along: GraphOS ExplorerExercise: Explore ExplorerGraphOSExercise: Creating a supergraphFollow-along: Metrics and observabilityFollow-along: Using `@defer`Making changes to the supergraphFollow-along: Schema checks & deployFollow-along: Schema publishExercise: Schema checksWhat's in a supergraph?Exercise: Add a subgraphExercise: Exploring entities & rover devFollow-along: Connecting data with entitiesWhat's next?
3. Exercise: Explore Explorer
1m

Exercise: Exploring Poetic Plates

🎯 Goal: Get to know the API and GraphOS Explorer! Complete all the tasks below.

For this exercise, let's take on the role of an API consumer, trying to build a frontend for the page below. What might your GraphQL query look like?

A mockup from the Poetic Plates app, showing a number of recipe boxes under a header titled "Recent Recipes."

GraphQL queries

Build your query, and try it out in the Sandbox to make sure you get data back.

query GetRecentlyAddedRecipes {
recentlyAddedRecipes {
prepTime
name
cookingTime
servings
}
}

Let's explore another of our Query type's entrypoints - querying for a random recipe!

Open a new operation tab in Sandbox and add the randomRecipe field. Add a few more fields, and submit the operation!

Example: Querying for a random recipe
query GetRandomRecipe {
randomRecipe {
prepTime
name
cookingTime
servings
ingredients {
name
}
}
}

Hmm, notice anything different? 🤔 You might have missed it—if you're curious, try running both of these operations again. We'll find that one of these queries takes a lot longer than the other to resolve. Keep this in mind... we'll circle back shortly!

Explorer features

Explorer helps accelerate development for API consumers. Take a few minutes to discover these features!

Features

Solutions

A screenshot of the Sandbox environment, with the cursor hovering over a share icon with the text 'Edit shareable operation link settings.'

A screenshot of the Sandbox environment, with the Operation Collections tab opened on the left. A button that reads 'Create collection' is highlighted.

A screenshot of a modal in Sandbox, with inputs to create a new Operation Collection. The Collection Name field is filled in with 'Recipes'.

A screenshot of the Sandbox environment, with the cursor hovering over a save icon with the text 'Save Operation' appearing.

A screenshot of a modal in Sandbox, with inputs to save the selected operation to a particular collection. The collection dropdown is expanded to reveal the newly created Recipes collection.

A screenshot of the Sandbox environment, with the cursor hovering over a table in the Response panel. The text beside it reads 'Show response in table view'.

A screenshot of the Sandbox environment, showing the number 3.08s highlighted inside of a pink rectangle above the Response panel.

Previous
Next

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.

              GraphOS

              A platform for building and managing a supergraph. It provides a management plane to test and ship changes and runtime capabilities to secure and monitor the graph.

              GraphQL

              An open-source query language and specification for APIs that enables clients to request specific data, promoting efficiency and flexibility in data retrieval.

              query

              A request for specific data from a GraphQL server. Clients define the structure of the response, enabling precise and efficient data retrieval.

              query

              A request for specific data from a GraphQL server. Clients define the structure of the response, enabling precise and efficient data retrieval.

              querying

              A request for specific data from a GraphQL server. Clients define the structure of the response, enabling precise and efficient data retrieval.

              operation

              A single query, mutation, or subscription that clients send to a GraphQL server to request or manipulate data.

              field

              A unit of data that belongs to a type in a schema. Every GraphQL query requests one or more fields.

              type Author {
              # id, firstName, and lastName are all fields of the Author type
              id: Int!
              firstName: String
              lastName: String
              }
              operation

              A single query, mutation, or subscription that clients send to a GraphQL server to request or manipulate data.

              NEW COURSE ALERT

              Introducing Apollo Connectors

              Connectors are the new and easy way to get started with GraphQL, using existing REST APIs.

              Say goodbye to GraphQL servers and resolvers—now, everything happens in the schema!

              Take the course