- install nodejs
- install Yarn
- install Docker
yarn install
./start-db.sh
In first terminal start build process in watch mode:
yarn watch
In second terminal start an application:
yarn start
Open http://localhost:4000 to see Graphql Playground
- Run
signIn
mutation in API Browser:
mutation {
signIn (email: "admin@example.com", password: "123456") {
token
result {
success
message
}
}
}
Copy received token to HTTP HEADERS section:
{"Authorization": "<token-here>"}
Then you can run, for example, me
query:
{ me {
id
email
role
appointments {
id
status
startTime
description
issuer {
email
}
}
}}
( for receiver id provide valid user id)
mutation {
appointmentCreate(description: "test 1", receiver: "5fe4658a6b4dc07520e93079",
startTime: "2020-12-24 12:30", endTime: "2020-12-24 12:45") {
appointment {
status
id
description
startTime
endTime
receiver {
id
email
created
},
issuer {
id
email
created
}
}
result {
success
message
},
errors {
startTime
endTime
receiver
}
}
}
{ appointments {
id
status
startTime
}}
mutation {
appointmentApprove(id: "5fe465d26b4dc07520e9307a") {
result {
success
message
}
appointment {
id
status
}
}
}
( provide valid appointment id )
{ me {
id
email
role
appointments {
id
status
description
receiver {
appointments {
id
status
startTime
description
}
}
}
}}