From REST to GraphQL: Different way to create API (with Apollo & Node.js)

Click for: original source

Dirk Wolthuis wrote this tutorial about moving from REST to GraphQL. If you already have a MySQL database you have an excellent starting point for creating a scalable API.

In this tutorial, he will cover how to create models based on your database, create a NodeJS GraphQL API that reads the data from the database, and learn how to make relations in your GraphQL API between different tables.

The content of the tutorial:

  • Step 1: database layer
  • Step 2: bootstrapping the application
  • Step 3: creating the database models
  • Step 4: implementing the database models
  • Step 5: setting up an Apollo server
  • Step 6: creating our GraphQL types and resolvers

… and much more. If you want to code along, you can check out this repository and clone the start of the tutorial release. You have a usable GraphQL API that you can customize any way you want. Excellent!

[Read More]

Tags apis nodejs javascript web-development nosql restful