Live data from Hacker News

Introducing Yelp's GraphQL API

engineeringblog.yelp.com

11–20 of 54 posts

Re: Introducing Yelp's GraphQL API

#12

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/

Mapcode doesn't identify a place/business/venue, it identifies a location on earth. If the building moves or a business changes offices then the Mapcode changes, too.

Take a look at Mapzen's gazetteer project "Whose on First". It aims to generate a unique identifier (and store with it concordances for other venue IDs, opening hours, images, etc.) for every venue on earth and is designed to handle situations where a business is started, changes location, or closes.

https://whosonfirst.mapzen.com/

(Disclaimer: I work for Mapzen)

Re: Introducing Yelp's GraphQL API

#13

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: "gar…

You can recurse in GraphQL so if they added a `favorited_businesses` field to `user` then it would be possible. Something like this:

  business(id: "garaje-san-francisco") {
    reviewers {
      rating
      user {
        name
        favorited_businesses {
          id
          name
        }
      }
    }
  }

Re: Introducing Yelp's GraphQL API

#14
post #2

Going to sign up for the beta program. BTW, if you're in the SF area, definitely try Garaje. One of the best tacos and beers around.

These recommendations would have been great 6 months ago; unfortunately I just moved to San Antonio.. Actually, I'm flush for great tacos now :D

Re: Introducing Yelp's GraphQL API

#15

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/

Mapcode doesn't identify a place/business/venue, it identifies a location on earth. If the building moves or a business changes offices then the Mapcode changes, too. Take a look at Mapzen's gazetteer project "Whose on First". It aims to generate a unique identifier (and store with it concordances for other venue IDs, opening hours, images, etc.) for every venue on earth and is designed to handle situations where a b…

Very cool! Business (vs. what I call place) is interesting, indeed. I'm working in local media with 150+ year content archives so for this ask I'm more interested in telling the story about a location on earth then the business that currently occupies it. Businesses come and go (or move around) but looking at a single place on earth can be quite the storytelling opportunity too!

Re: Introducing Yelp's GraphQL API

#18

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/

[deleted]

Re: Introducing Yelp's GraphQL API

#20

Not sure if anyone at Yelp reads HN but looks like a bunch of the sample queries are broken. I'm not familar enough with GraphQL on how to fix them. https://www.yelp.com/developers/graphql/query/reviews

It looks like the error on that page is asking you to create an API account and authenticate. So maybe not an error in the API itself, but an oversight in documentation?
Post reply on HN