Follow-along: Querying for a featured location
Let's try another query! Let's expand to include the featured location, another piece of our mockup for Comet Cruises.
Create a new tab in Sandbox.
Copy-paste the same query from before, as a starting point.
query HomepageLocations {locations {idnamedescriptionphoto}}Rename the operation to
HomepageWithFeatured
.query HomepageWithFeatured {locations {idnamedescriptionphoto}}Add the
featuredLocation
field, along with itsid
,name
andphoto
.query HomepageWithFeatured {featuredLocation {idnamephoto}locations {idnamedescriptionphoto}}
Hmmm, is this query feeling a lil' slow to you? 🐢
We don't have any insight into our graph to pinpoint what's happening, what's causing the slowness. It would be great to also have a way to fix it and be able to grow our graph safely for new features like the activities data we still need to include!
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.