Issue Description: What’s happening?
When running the default task created by 8base CLI’s init command, it returns an error: TaskResult is not defined
Reproduce the Issue: What steps can someone take to replicate the problem?
- Run
8base init my-project
- Run
8base invoke-local task -j ' "foo" : "bar" '
Expected Behavior: What did you expect to happen?
Function is supposed to return
{
"data": {
"result": "Task recieved: bar"
}
}
Actual Behavior: What actually happened?
{
"data": {
"task": null
},
"errors": [
{
"message": "TaskResult is not defined",
"path": [
"task"
],
"locations": [
{
"line": 2,
"column": 5
}
],
"code": null,
"details": null
}
]
}
error: "task" returns an error.
error: Time: 773 ms.
More details or screenshot
To solve I simply wrapped TaskResult in a Promise and the function behaved properly. I also had to replace event.data.foo
with event.foo
for simpler input JSON