A Redwood.js demo app that retrieves and displays data from an AppSync GraphQL service. See this discussion for details.
I used an AppSync endpoint that returned data with the following schema. This was an existing service that is not available publicly.
type ZipData {
zip: String
timezone: String
restaurants: [RestaurantData]
}
type RestaurantData {
name: String
latitude: String
longitude: String
}
type Query {
get_zip(zip: String!): ZipData
}
schema {
query: Query
}
Create .env
with the following settings
GOOGLE_MAPS_API_KEY=
APPSYNC_API_ENDPOINT_URL=https://....appsync-api.us-east-1.amazonaws.com/graphql
APPSYNC_API_KEY=
yarn redwood dev