Execute Queries to an AWS AppSync GraphQL API from a React Application

Instructornader dabit

Share this video with your friends

Send Tweet

In this lesson we’ll execute GraphQL queries using our AWS AppSync API and show how to display the returned data inside of our React application using the AWS AppSync GraphQL client.

We'll create a query string using gql (graphql-tag) and pass that query into a graphql Higher-order component where we will pass the resulting data in our exisiting app.

Gribbs
~ 6 years ago

I had to yarn add graphql and apollo-client before I could get this lesson to work

Gribbs
~ 6 years ago

Actually, I meant to put this comment on lesson 5

Olivier
~ 5 years ago

App is now a function, it would be great to refresh the tutorial

Michael Friedman
~ 5 years ago

I had to downgrade to app-sync 1.7.1 to get the list to render. Looks like there's a breaking change in the latest update.

Aaron Sturm
~ 4 years ago

create-react-app now creates a functional component vs the class based in this video. To make this lesson work, add props as an argument to App function App(props) and remove this from this.props so that it's just props.todos.map.