The YC Startup Directory

GraphQL API

Why?

Problem

The page that lists YC companies at ycombinator.com/companies fetches much more data than needed to display the listing page.

Solution

Use GraphQL to reduce the payload by selecting only the fields that are needed at the listing page. EdgeGraph provides a layer of abstraction for Algolia by wrapping their API calls.

Examples of queries

On a listing page, we may need only a few fields. Thus, smaller payload.

{
  companies {
    name
    one_liner
  }
}

On a details page, we need more data.

{
  companies {
    name
    slug
    tags
    small_logo_thumb_url
    location
    one_liner
    batch
    long_description
  }
}

Playground

Go to the Playground to interact with this GraphQL endpoint.