Tasks Queries

These queries allow you to interact with tasks data.

listTasks

Arguments

ArgumentTypeDescription
afterStringCursor for forward pagination
beforeStringCursor for backward pagination
filtersTasksFiltersFilters
firstIntFirst
lastIntLast
orderBy[TasksOrderBy]Order by
Example Query
query(
$filters: TasksFilters,
$first: Int,
$orderBy: [TasksOrderBy]
) {
listTasks(
filters: $filters,
first: $first,
orderBy: $orderBy
) {
edges {
node {
id
# Add other fields you need
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Variables
{
"filters": {},
"first": 1,
"orderBy": {}
}

overdueTasksCount

Returns: Int
Example Query
query {
overdueTasksCount {
id
# Add other fields you need
}
}

task

Returns: Task

Arguments

ArgumentTypeDescription
idrequiredID!Unique identifier
Example Query
query($id: ID!) {
task(id: $id) {
id
# Add other fields you need
}
}
Variables
{
"id": "1"
}

taskCategories

Returns: [TaskCategory]
Example Query
query {
taskCategories {
id
# Add other fields you need
}
}

taskGroups

Returns: [TaskGroup]

Arguments

ArgumentTypeDescription
locationIdrequiredID!ID of the location
Example Query
query($locationId: ID!) {
taskGroups(locationId: $locationId) {
id
# Add other fields you need
}
}
Variables
{
"locationId": "1"
}

tasks

Returns: [Task]

Query for a list of tasks

Arguments

ArgumentTypeDescription
doneBooleanFilter by completion status
endDateEnding point for the range
limitIntMaximum number of results to return
locationIdIDID of the location
offsetIntNumber of results to skip for pagination
overdueBooleanOnly show overdue due tasks
patientIdIDID of the patient
startDateStarting point for the range
viewerAssignedBooleanIf we should only show tasks assigned to the viewer
Example Query
query(
$done: Boolean,
$end: Date,
$limit: Int,
$locationId: ID,
$offset: Int,
$overdue: Boolean,
$patientId: ID,
$start: Date,
$viewerAssigned: Boolean
) {
tasks(
done: $done,
end: $end,
limit: $limit,
locationId: $locationId,
offset: $offset,
overdue: $overdue,
patientId: $patientId,
start: $start,
viewerAssigned: $viewerAssigned
) {
id
# Add other fields you need
}
}
Variables
{
"done": true,
"end": {},
"limit": 1,
"locationId": "1",
"offset": 1,
"overdue": true,
"patientId": "1",
"start": {},
"viewerAssigned": true
}

tasksCount

Returns: Int

Arguments

ArgumentTypeDescription
doneBooleanFilter by completion status
endDateEnding point for the range
locationIdIDID of the location
patientIdIDID of the patient
startDateStarting point for the range
viewerAssignedBooleanViewer assigned
Example Query
query(
$done: Boolean,
$end: Date,
$locationId: ID,
$patientId: ID,
$start: Date,
$viewerAssigned: Boolean
) {
tasksCount(
done: $done,
end: $end,
locationId: $locationId,
patientId: $patientId,
start: $start,
viewerAssigned: $viewerAssigned
) {
id
# Add other fields you need
}
}
Variables
{
"done": true,
"end": {},
"locationId": "1",
"patientId": "1",
"start": {},
"viewerAssigned": true
}