After downloading this example please follow these steps or watch the walkthrough video for this example!
To run this example, please create a Graphcool account and copy your endpoint. This shouldn't take longer than a minute. We promise!
This is how our GraphQL data model looks like:
type Post {
description: String!
imageUrl: String!
}
export REACT_APP_GRAPHQL_ENDPOINT="https://api.graph.cool/simple/v1/__PROJECT_ID__"
You're done configuring the example application. Please run the following command and open localhost:3000 in your browser. Have fun exploring! 🎉
npm install
npm start
Replace this line in package.json
"start": "REACT_APP_GRAPHQL_ENDPOINT=${REACT_APP_GRAPHQL_ENDPOINT:=https://api.graph.cool/simple/v1/__PROJECT_ID__} react-scripts start",
with
"start": "set REACT_APP_GRAPHQL_ENDPOINT=https://api.graph.cool/simple/v1/__PROJECT_ID__&&react-scripts start",
Join our Slack community if you run into issues or have questions. We love talking to you!