Skip to content

Instantly share code, notes, and snippets.

@mustafa-qamaruddin
Last active June 6, 2022 08:44
Show Gist options
  • Save mustafa-qamaruddin/8448df5dbdfc688028188cea136108e2 to your computer and use it in GitHub Desktop.
Save mustafa-qamaruddin/8448df5dbdfc688028188cea136108e2 to your computer and use it in GitHub Desktop.
Create Task
# create account
mutation createAccount($value:AccountInput!) {
createAccount(value:$value)
{
id
instanceId
}
}
{
"value": {
"hypi": {
"id": "u.1947"
},
"username": "u.1947",
"emails": {"value": "[email protected]"},
"password": {
"value": "1234567890"
}
}
}
# login
{
login(
username: "u.1947",
password: "1234567890"
) {
sessionToken
}
}
# create task and assign to himself
mutation upsert($values:HypiUpsertInputUnion!) {
upsert(values:$values){
id
}
}
{
"values": {
"Task": {
"type": "TASK",
"name": "New task title",
"assignee": {
"hypi": {
"id": "u.1947"
}
},
"currentPeriod": {
"due": "2022-04-28 18:14:35.127972"
},
"description": "",
"subtasks": [
{
"name": "subtask 1 title",
"done": "2022-04-28 18:28:58.884110"
}
],
"recurring": true,
"enableOverdueAlert": false,
"receiveUpdates": false,
"when": "NA",
"onWhen": "NA",
"remindWhen": "NA",
"reminOnWhen": "NA"
}
}
}
# get the task
{
get(type: Task, id: "01G1RJ1X1BTEXMDP98GB6VXRQJ") {
... on Task {
hypi {
id
}
assignee {
hypi {
id
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment