Skip to content

Latest commit

 

History

History
70 lines (55 loc) · 1.14 KB

File metadata and controls

70 lines (55 loc) · 1.14 KB

TodoAppWithApolloClient

Client: React.js with ApolloClient && Server: ApolloServer 🤘 :)

Get started

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

Testing

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
      }
    ]
  }
}

Playground

play