# project

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

```graphql
project(id: UUID!): Project!
```

Fetches a project that was not deleted, by its identifier.

## Arguments

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

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

```graphql
type Project
```

A construction project in Archipad.

### Fields

- `address`: `String!` — Postal address of the project, in free text; empty when not given.
- `companyId`: `String` — Identifier of the company the project belongs to; null when it is not known.
- `createdAt`: [`DateTime!`](https://docs.archipad.dev/apis/archipad-graphql/types/DateTime.md) — When the project was created.
- `deleted`: `Boolean!` — Whether the project was deleted. Deleted projects are never returned: always false.
- `deletedAt`: [`DateTime`](https://docs.archipad.dev/apis/archipad-graphql/types/DateTime.md) — When the project was deleted. Deleted projects are never returned: always null.
- `id`: `String!` — Identifier of the project.
- `issues`: [`IssueConnection!`](https://docs.archipad.dev/apis/archipad-graphql/types/IssueConnection.md) — Issues of the project, by page of 50 unless `first` says otherwise.
   - `after`: `String` — Cursor of the last item already received, the `endCursor` of the previous page: returns the items after it. Pass the other arguments of the previous page unchanged, or the cursor is refused. Omitted: the first page.
   - `first`: `Int` = `50` — Number of items of the page, from 1 to 100.
   - `phase`: `String` — Keeps the issues of the phase with exactly this `key`.
   - `region`: `String` — Keeps the issues of the region with exactly this `name`.
   - `status`: `String` — Keeps the issues whose `status` is exactly this state name.
- `name`: `String!` — Name of the project.
- `participants`: [`[ProjectParticipant!]!`](https://docs.archipad.dev/apis/archipad-graphql/types/ProjectParticipant.md) — People with access to the project. Accounts without an e-mail address or a set of permissions are left out.
   - `filter`: [`ProjectParticipantsFilterInput`](https://docs.archipad.dev/apis/archipad-graphql/types/ProjectParticipantsFilterInput.md) — Narrows the participants; omitted: every participant.
- `phases`: [`[Phase!]!`](https://docs.archipad.dev/apis/archipad-graphql/types/Phase.md) — Phases of the project, deleted ones included: check `deleted`.
- `regions`: [`[ProjectRegion!]!`](https://docs.archipad.dev/apis/archipad-graphql/types/ProjectRegion.md) — Regions of the project, deleted ones included: check `deleted`.
- `updatedAt`: [`DateTime!`](https://docs.archipad.dev/apis/archipad-graphql/types/DateTime.md) — When the project was last changed.

## Example

Request:

```graphql
{
  project(id: "00000000-0000-0000-0000-000000000000") {
    address
    companyId
    createdAt
    deleted
    deletedAt
    id
    name
    phases {
      createdAt
      deleted
      deletedAt
      id
      index
      key
      name
      updatedAt
      validDurationAfterHandover
    }
    regions {
      createdAt
      deleted
      deletedAt
      handedOver
      handedOverOn
      id
      name
      parentId
      updatedAt
    }
    updatedAt
  }
}
```

Response:

```json
{
  "data": {
    "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",
      "phases": [
        {
          "createdAt": "2024-01-01T00:00:00.000Z",
          "deleted": true,
          "deletedAt": "2024-01-01T00:00:00.000Z",
          "id": "string",
          "index": 1,
          "key": "string",
          "name": "string",
          "updatedAt": "2024-01-01T00:00:00.000Z",
          "validDurationAfterHandover": 1
        }
      ],
      "regions": [
        {
          "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"
        }
      ],
      "updatedAt": "2024-01-01T00:00:00.000Z"
    }
  }
}
```
