query getTodos {
getAllTodos {
name
completed
date
id
priority
}
}
Add a new todo: name: "Complete the final assessment"
mutation newTodo {
addTodo(name: "Complete the final assessment", priority: high) {
name
id
completed
date
}
}
Show the: "Completed final assessment" todo
query getSingleTodo {
getTodo(id: 1) {
name
completed
id
date
}
}
Complete the: "Complete final assessment" todo
mutation completeTodo {
completeTodo(id: 1) {
name
completed
}
}
query getCompleted {
getCompletedTodos {
name
date
completed
id
}
}
Show all incomplete todos
query getNotCompleted {
getNotCompletedTodos {
name
date
id
completed
}
}