A simple task scheduler with GraphQL bindings.
-
npm (version 8 or newer)
-
Node.JS (version 16 or newer)
To run the GraphQL server locally, type the following in a console of your choosing.
$ npm run start
A single task composed of unique ID (id
), name
, durationUnit
, duration
, percentDone
, and startDate
.
type Task {
startDate: String
durationUnit: String
percentDone: Int
duration: Int
name: String
id: Int
}
A single dependency composed of unique ID (id
), fromTask
, and toTask
fields.
type Dependency {
fromTask: Int
toTask: Int
id: Int
}
Retrieves all tasks in the tasks registry.
query GetTasks {
tasks {
durationUnit
percentDone
startDate
duration
name
id
}
}
Retrieves all task dependencies.
Reflects a chronology that ensures that a new task directly follows a predecessor.
query GetDependencies {
dependencies {
fromTask
toTask
id
}
}
Adds a new task to the registry.
mutation AddTask {
addTask(name: "Work out", duration: 2)
}
Updates a task that exists in the registry.
mutation UpdateTask {
updateTask(id: 3, name: "Read JS Book", duration: 4, percentDone: 40)
}