loading...

A GraphQL & Node.js Server Built with Express in No Time

couellet profile image Charles Ouellet Originally published at snipcart.com on ・1 min read

graphql-nodejs

We’ve already played with GraphQL a few times on the blog.

Always with great results as GraphQL is pretty awesome—and more in vogue than ever!

But we’ve mostly stuck to the frontend side of things, using existing APIs and built-in GraphQL implementations.

Here, I’ll be trying something different. For this, I need to jump to the obscure place that is server-side development.

More precisely, I’ll go on and craft a GraphQL server using Node.js Express.

To do so, I’ll leverage these tools to create and expose a simple API. For this use case, I’ll also throw in PostgreSQL as a database and the Join Monster library to optimize my queries.

The tutorial will cover:

  • Creating a project for the API
  • Building a GraphQL schema and resolvers
  • Crafting an Express app
  • Linking the GraphQL API to a PostgreSQL database

But let’s not get ahead of ourselves just yet. For now, let’s start with a few definitions.

Read the rest of this post here

Discussion

pic
Editor guide