5. Follow-along: Querying for a featured location
1m

Follow-along: Querying for a featured location

Let's try another ! 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 from before, as a starting point.

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

    query HomepageWithFeatured {
    locations {
    id
    name
    description
    photo
    }
    }
  4. Add the featuredLocation , 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 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

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.