https://github.com/dblock/redwood-js-appsync-graphql-demo
Redwood.js Demo App that calls an AppSync GraphQL endpoint.
https://github.com/dblock/redwood-js-appsync-graphql-demo
Last synced: about 1 year ago
JSON representation
Redwood.js Demo App that calls an AppSync GraphQL endpoint.
- Host: GitHub
- URL: https://github.com/dblock/redwood-js-appsync-graphql-demo
- Owner: dblock
- License: mit
- Created: 2020-08-26T19:29:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T12:52:07.000Z (over 2 years ago)
- Last Synced: 2025-02-10T14:12:58.201Z (over 1 year ago)
- Language: JavaScript
- Size: 1.44 MB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A [Redwood.js](https://redwoodjs.com) demo app that retrieves and displays data from an AppSync GraphQL service. See [this discussion](https://community.redwoodjs.com/t/how-can-i-wire-up-a-graphql-api-to-redwoodjs/1112) for details.

### Run Me
#### API
I used an AppSync endpoint that returned data with the following schema. This was an existing service that is not available publicly.
```graphql
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
}
```
#### Settings
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=
```
#### Run
```
yarn redwood dev
```