Building AI Enabled GraphQL Applications

Nader Dabit
Open GraphQL
Published in
7 min readMay 24, 2018

--

How to use GraphQL to map to AWS Lambda functions that work with AI services.

For the final codebase, check out the GitHub repo here.

Follow me on Twitter to hear about future posts -> https://twitter.com/dabit3

In this post we’ll be building a React Native app that takes user input text, translates it into another language, synthesizes the language to actual speech and plays it back for us!

We’ll be using AWS AppSync as the GraphQL endpoint & AWS Amplify for the GraphQL client.

One of the most powerful things about AWS AppSync is the ability to use Lambda functions as first class endpoints to seamlessly integrate almost any service or database into your GraphQL API without much hassle.

We’ll see that in action in this post.

This app is built with four main parts:

  1. A client application (built with React Native)
  2. An Amazon S3 bucket that holds the translated MP3s
  3. A Lambda function that will handle the GraphQL query, do processing with Amazon Polly & Amazon Translate, place an MP3 into an S3 bucket, then return the id for the created MP3 so we can play it.
  4. The GraphQL API (built with AWS AppSync)

--

--

Nader Dabit
Open GraphQL

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