5. Follow-along: Querying for a featured location1m

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.

Mockup

  1. Create a new tab in Sandbox.

  2. Copy-paste the same query from before, as a starting point.

    query HomepageLocations {
    locations {
    id
    name
    description
    photo
    }
    }
  3. Rename the operation to HomepageWithFeatured.

    query HomepageWithFeatured {
    locations {
    id
    name
    description
    photo
    }
    }
  4. Add the featuredLocation field, along with its id, name and photo.

    query HomepageWithFeatured {
    featuredLocation {
    id
    name
    photo
    }
    locations {
    id
    name
    description
    photo
    }
    }

Hmmm, is this query feeling a lil' slow to you? 🐢

Task!

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!

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. Note that all comments are public and must follow the Apollo Code of Conduct. You'll need a GitHub account to post below. Don't have one? Post in our Odyssey forum.