task
Returns the status of an asynchronous Task by ID. Tasks are created by mutations like send and createTask. The response is a JSON string containing task status and results.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
id | ID | No | Global node ID |
taskId | ID | No | Task-specific ID |
Provide either id or taskId.
Return Type
AWSJSON — a JSON string. Parse it to inspect task status.
Example
query RetrieveTask($taskId: ID!) {
task(id: $taskId)
}
The returned JSON typically contains status information about the async operation. Poll this query to check whether a send or other long-running operation has completed.
Related
- send — returns a task ID
- createTask
- TaskStatus enum