# issue

A query of the [Archipad API](https://docs.archipad.dev/apis/archipad-graphql.md).

```graphql
issue(id: UUID!): Issue!
```

Fetches an issue that was not deleted, by its identifier.

## Arguments

- `id`: [`UUID!`](https://docs.archipad.dev/apis/archipad-graphql/types/UUID.md) (required) — Identifier of the issue.

## Returns [`Issue!`](https://docs.archipad.dev/apis/archipad-graphql/types/Issue.md)

```graphql
type Issue
```

An issue raised on a project and pinned on one of its plans.

### Fields

- `comments`: [`[IssueComment!]!`](https://docs.archipad.dev/apis/archipad-graphql/types/IssueComment.md) — Comments on the issue that have text; history entries, such as status changes, are left out.
- `createdAt`: [`DateTime!`](https://docs.archipad.dev/apis/archipad-graphql/types/DateTime.md) — When the issue was created.
- `deleted`: `Boolean!` — Whether the issue was deleted. Deleted issues are never returned: always false.
- `deletedAt`: [`DateTime`](https://docs.archipad.dev/apis/archipad-graphql/types/DateTime.md) — When the issue was deleted. Deleted issues are never returned: always null.
- `description`: `String!` — What the issue is about, as its author wrote it.
- `dueAt`: [`DateTime`](https://docs.archipad.dev/apis/archipad-graphql/types/DateTime.md) — Deadline to resolve the issue; null when it has none.
- `id`: `String!` — Identifier of the issue.
- `indexes`: [`IssueIndexes!`](https://docs.archipad.dev/apis/archipad-graphql/types/IssueIndexes.md) — The numbers that identify the issue to people.
- `location`: `String!` — Where the issue is, in free text, such as a room; empty when not given.
- `mapId`: `String!` — Identifier of the plan the issue is pinned on.
- `phase`: [`IssuePhase!`](https://docs.archipad.dev/apis/archipad-graphql/types/IssuePhase.md) — Phase of the project the issue belongs to.
- `position`: [`IssuePosition!`](https://docs.archipad.dev/apis/archipad-graphql/types/IssuePosition.md) — Where the issue is pinned on its plan.
- `project`: [`Project!`](https://docs.archipad.dev/apis/archipad-graphql/types/Project.md) — Project the issue belongs to.
- `region`: [`IssueRegion`](https://docs.archipad.dev/apis/archipad-graphql/types/IssueRegion.md) — Region of the plan the issue is pinned on; null when the plan belongs to no region.
- `status`: `String!` — Name of the current state of the issue, as configured in the project; empty when it has none.
- `updatedAt`: [`DateTime!`](https://docs.archipad.dev/apis/archipad-graphql/types/DateTime.md) — When the issue was last changed.

## Example

Request:

```graphql
{
  issue(id: "00000000-0000-0000-0000-000000000000") {
    comments {
      authorId
      createdAt
      id
      text
    }
    createdAt
    deleted
    deletedAt
    description
    dueAt
    id
    indexes {
      plan_legacy
      project
    }
    location
    mapId
    phase {
      id
      key
      name
    }
    position {
      x
      y
    }
    project {
      address
      companyId
      createdAt
      deleted
      deletedAt
      id
      name
      updatedAt
    }
    region {
      createdAt
      deleted
      deletedAt
      handedOver
      handedOverOn
      id
      name
      parentId
      updatedAt
    }
    status
    updatedAt
  }
}
```

Response:

```json
{
  "data": {
    "issue": {
      "comments": [
        {
          "authorId": "string",
          "createdAt": "2024-01-01T00:00:00.000Z",
          "id": "string",
          "text": "string"
        }
      ],
      "createdAt": "2024-01-01T00:00:00.000Z",
      "deleted": true,
      "deletedAt": "2024-01-01T00:00:00.000Z",
      "description": "string",
      "dueAt": "2024-01-01T00:00:00.000Z",
      "id": "string",
      "indexes": {
        "plan_legacy": 1.5,
        "project": 1.5
      },
      "location": "string",
      "mapId": "string",
      "phase": {
        "id": "string",
        "key": "string",
        "name": "string"
      },
      "position": {
        "x": 1.5,
        "y": 1.5
      },
      "project": {
        "address": "string",
        "companyId": "string",
        "createdAt": "2024-01-01T00:00:00.000Z",
        "deleted": true,
        "deletedAt": "2024-01-01T00:00:00.000Z",
        "id": "string",
        "name": "string",
        "updatedAt": "2024-01-01T00:00:00.000Z"
      },
      "region": {
        "createdAt": "2024-01-01T00:00:00.000Z",
        "deleted": true,
        "deletedAt": "2024-01-01T00:00:00.000Z",
        "handedOver": true,
        "handedOverOn": "value",
        "id": "string",
        "name": "string",
        "parentId": "string",
        "updatedAt": "2024-01-01T00:00:00.000Z"
      },
      "status": "string",
      "updatedAt": "2024-01-01T00:00:00.000Z"
    }
  }
}
```
