This repository contains a Express-based GraphQL API for the Medi App.
Install dependencies
npm install
Build server
gulp build
// Test
source .env.test
// Development
source .env
JWT auth tokens need to be passed in the HTTP header: { authorization: Bearer + ' ' + JWT }
mutation { addUser(email: "[email protected]", first_name:"Manuel", last_name:"Tester", password: "test2016") { id, token } }
mutation{ updateUser(id: 12, email: "[email protected]", first_name:"Thomas", password: "new_password") { id, email, first_name, last_name } }
mutation { deleteUser(id: 3) { id } }
mutation { authenticateUser(email: "[email protected]", password: "jimmy1") { token } }
{ user { id email, first_name, last_name, sessions { id, status, date, duration_planned, duration_success, location, note } } }
mutation { addSession(user_id: 1, status: true, location: "In the forest", note: "Feeling good", date:"2016-04-27 04:05:06", duration_planned:600, duration_success: 600) { id } }
mutation{ updateUser(id: 12, email: "[email protected]", first_name:"Thomas", password: "new_password") { id, email, first_name, last_name } }
mutation { deleteUser(id: 3) { id } }
{ session { id date duration_planned duration_success user_id status note } }