Live data from Hacker News

Introducing Yelp's GraphQL API

engineeringblog.yelp.com

1–10 of 54 posts

Re: Introducing Yelp's GraphQL API

#5
Nice to see some technical leadership from Yelp. A tight partnership with 3rd party developers may be a nice way to go up against Google My Business and Bing Places.

If anyone from Yelp engineering is reading this, I'd love to see a major player get behind some standard for uniquely identifying places on which we could join public and private place-based datasets. I like mapcodes: http://www.mapcode.com/

Re: Introducing Yelp's GraphQL API

#8

Is it possible to do more complex requests in GraphQL, like getting the favorite venues of people that favored "Garaje" or is it left to the API provider?

Left to the API provider. The provider specifies arguments you can provide per field. You can call those arguments.

Re: Introducing Yelp's GraphQL API

#9

Is it possible to do more complex requests in GraphQL, like getting the favorite venues of people that favored "Garaje" or is it left to the API provider?

Yes.. Its left to the API provider.

Try https://learngraphql.com gives a very good idea of what graphql is. Way better than reading the official documentation or spec.

Once I went through it, made up my mind that our API as a service product should support Graphql.

Note: I am in no way related to the site.. It is free and I finally actually understood what graphql is in 15 mins.

Re: Introducing Yelp's GraphQL API

#10

Is it possible to do more complex requests in GraphQL, like getting the favorite venues of people that favored "Garaje" or is it left to the API provider?

Not really. GraphQL mostly provides an alternative to REST when you want to select specific fields and traverse down into relationships with a single query.

The closest you could get is the users who rated the business:

  business(id: "garaje-san-francisco") {
    reviewers {
      rating
      user {
        name
      }
    }
  }
If Yelp wanted to enable that use case, they would add a field to Business like `related_businesses` like:

  business(id: "garaje-san-francisco") {
    related_businesses {
      business {
        name
      }
    }
  }
Post reply on HN