From the course: Programming Foundations: APIs and Web Services

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Consume a GraphQL API

Consume a GraphQL API

From the course: Programming Foundations: APIs and Web Services

Start my 1-month free trial

Consume a GraphQL API

- [Narrator] Let's look at consuming a public GraphQL API. This is a fun GraphQL API provided by Yelp. So let's navigate to their guides page. So Yelp provides a GraphQL API that allows for developers to access user reviews, recommendations of top restaurants, shopping, nightlife, entertainment, services, and more. So this page just tells a little bit more about their GraphQL API. Now, let's navigate to their version of the GraphiQL interface. So to make it easier for you to experiment with the different queries, they've provided this GraphiQL interface, which is an interactive web console that is an in-browser IDE for querying GraphQL endpoints. So this is just a view of the GraphiQL console. Now note you will have to be logged in and also signed up to their developer beta program in order to access GraphiQL. So this is just a sample GraphQL query. Notice, we are looking for the name, reviews, ratings, time created, and the URL. So let's just execute this query. And notice the data…

Contents