Calling a GraphQL API in Redwood.js

1 · Daniel Doubrovkine (dB.) @dblockdotorg · Aug. 27, 2020, 8:43 p.m.
I recently needed to stand up a demo app that invoked an AWS AppSync GraphQL API. The existing endpoint (not available publicly) returned restaurant data for a given zip with the following schema. type ZipData { zip: String timezone: String restaurants: [RestaurantData] } type RestaurantData { name: String latitude: String longitude: String } type Query { get_restaurants_by_zip(zip: String!): ZipData } schema { query: Query } The app I wanted to build was throwaway, and my goa...