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?
GraphQL queries
Build your query, and try it out in the Sandbox to make sure you get data back.
query GetRecentlyAddedRecipes {recentlyAddedRecipes {prepTimenamecookingTimeservings}}
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!
query GetRandomRecipe {randomRecipe {prepTimenamecookingTimeservingsingredients {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!
Solutions
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.