# projects

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

```graphql
projects(after: String, first: Int): ProjectConnection!
```

Lists the projects the client may reach, such as the ones of its company, by page of 50 unless `first` says otherwise. Projects that were deleted are left out; listed in a fixed order, so that paging neither skips nor repeats a project.

## Arguments

- `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.

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

```graphql
type ProjectConnection
```

A page of projects, as in the GraphQL Cursor Connections Specification: `edges` carry the projects and their cursors, `pageInfo` tells whether a page follows and how to ask for it.

### Fields

- `edges`: [`[ProjectEdge!]!`](https://docs.archipad.dev/apis/archipad-graphql/types/ProjectEdge.md) — The projects of the page, each with its cursor.
- `pageInfo`: [`PageInfo!`](https://docs.archipad.dev/apis/archipad-graphql/types/PageInfo.md) — Where the page stands in the list.

## Example

Request:

```graphql
{
  projects {
    edges {
      cursor
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
  }
}
```

Response:

```json
{
  "data": {
    "projects": {
      "edges": [
        {
          "cursor": "string"
        }
      ],
      "pageInfo": {
        "endCursor": "string",
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "string"
      }
    }
  }
}
```
