We're still working on documentation among other things before further publicizing it. Hope to take lessons from Yelp and others on best practices with it.
Introducing Yelp's GraphQL API
21–30 of 54 posts
Re: Introducing Yelp's GraphQL API
#22Not 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?
Re: Introducing Yelp's GraphQL API
#23Re: Introducing Yelp's GraphQL API
#24Nice 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
#25Not 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
Re: Introducing Yelp's GraphQL API
#26Is there any information on challenges developers have found with GraphQL out there?
Re: Introducing Yelp's GraphQL API
#27Earlier quoted context omitted.
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 } } } }
Using the business as the root query would be a bit cumbersome, but more like:
business(id: "garaje-san-francisco") {
reviewers {
user {
name
favorited_businesses
favorited_businesses(name: "garaje")
}
}
}
If they provide user queries, then something like: user {
name
favorited_businesses
favorited_businesses(name: "garaje")
}Re: Introducing Yelp's GraphQL API
#28Re: Introducing Yelp's GraphQL API
#29Can someone explain why GraphQL was designed to be non-JSON? Seems like a stupid decision, unless I'm missing something.
Re: Introducing Yelp's GraphQL API
#30Can someone explain why GraphQL was designed to be non-JSON? Seems like a stupid decision, unless I'm missing something.