3. Exercise: Explore Explorer
1m

Exercise: Exploring Poetic Plates

🎯 Goal: Get to know the API and ! 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 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

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

Features

Solutions

Previous