From the course: Programming Foundations: APIs and Web Services

Unlock the full course today

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

Create an API with GraphQL

Create an API with GraphQL

From the course: Programming Foundations: APIs and Web Services

Start my 1-month free trial

Create an API with GraphQL

- [Instructor] Many different programming languages support GraphQL. For this example, we are going to use Node.js. So I've navigated to the nodejs.org page, and I've downloaded the version appropriate for my environment. So generally speaking, you'll need at least two main components, along with your API code, to run GraphQL powered app: a GraphQL server that serves your API, and a GraphQL client that connects to your endpoint. So in this case, I'm going to use the Express GraphQL server to serve the API. So I've navigated to Expressjs.com. Express is the simplest way to run a GraphQL api, and it's a very popular web application framework for Node.js. You can download it by going to the Express homepage and clicking on Getting started, and following these installation instructions. So next, I also downloaded and installed the GraphQL.js. So I use Node Package Manager to install this GraphQL specification. You'll also need it to generate your API. So let's get started with GraphQL, by…

Contents