Open GraphQL

Anything & Everything GraphQL

Member-only story

GraphQLifying REST

--

Transforming REST APIs to GraphQL with AWS AppSync

When adopting GraphQL into an existing project or an engineering team, one of the easiest ways to get started is to put a GraphQL API in front of your existing REST API endpoints.

Doing this will allow your team to immediately begin seeing some of the benefits that GraphQL has to offer without having to sacrifice a large amount of engineering work.

With AWS AppSync you can specify “HTTP” data sources to bring in existing HTTP endpoints & perform queries & mutations against them in GraphQL.

Let’s take a look at how we can port over these two types of HTTP APIs:

  • Cryptocurrency API that returns an array of data & allows us to query based on limit & starting point for pagination.
  • GitHub Jobs API that returns an array of jobs. We need to be able to query based on location & job description.

Let’s start building!

Getting Started

The first step is to create a new AWS AppSync API. To do so, visit the AppSync dashboard & click Create API.

Next, choose Build from scratch & click Next.

--

--

Nader Dabit
Nader Dabit

Written by Nader Dabit

Full Stack Product Engineer, Author, Teacher, Director of Developer Relations at Avara

Responses (6)