npm install
If you're going to use MongoDB, create a database with Atlas, add it to the .env.example file and rename the file to .env
npm run dev
Then navigate to http://localhost:5000/graphql
{
clients {
name
}
}
{
client(id: 1) {
name
email
}
}
{
project(id: 1) {
name
description,
client {
name
email
}
}
}
mutation {
addClient(name: "John Doe", email: "johndoe@gmail.com", phone: "789-745-712") {
id
name
email
phone
}
}
mutation {
deleteClient(id: 1) {
id
}
}
mutation {
addProject(name: "Sample Project", description: "This is the project description", status: "new", clientId: "1") {
name
description
}
}
mutation {
updateProject(status: "completed") {
name
status
}
}