3. Exercise: Explore Explorer
1m

Exercise: Exploring Poetic Plates

🎯 Goal: Get to know the API and 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 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 , 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 - for a random recipe!

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

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

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.