Client: React.js with ApolloClient && Server: ApolloServer 🤘 :)
Clone the repository:
git clone https://github.com/ffcabbar/react-apollo-client-and-server-todoapp.git
Install dependencies and run the app:
cd server
yarn install # or npm install
yarn start # or npm start
🌠
cd client
yarn install # or npm install
yarn start # or npm start
Open your browser at http://localhost:5555 and start sending queries.
Query:
query {
todos {
text
id
completed
}
}
The server returns the following response:
{
"data": {
"todos": [
{
"text": "Hello from GraphQL",
"id": "1583752618984",
"completed": true
},
{
"text": "react",
"id": "1583752700115",
"completed": true
},
{
"text": "graphql",
"id": "1583752704968",
"completed": false
}
]
}
}