# projectMembers

```graphql
query ProjectMembers($projectReference: ID!) {
  projectMembers(projectReference: $projectReference) {
    data {
      userId
      email
      name
      avatarSrc
      role
      source
      capabilities
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

Lists everyone with access to the project (its members and the owning account's owners and admins, each once under their higher grant) with role, source and resolved capabilities, one page at a time by user ID cursor. Requires project.members.read.

## Arguments

| Name               | Type   | Required | Description                                                          |
| ------------------ | ------ | -------- | -------------------------------------------------------------------- |
| `projectReference` | ID!    | Yes      | Project UUID, slug or domain. An inaccessible project is not\_found. |
| `limit`            | Int    |          | Members per page, 1 to 100; default 20.                              |
| `cursor`           | String |          | The previous page's pageInfo.endCursor.                              |

## Variables

```json
{
  "projectReference": "string"
}
```

## Responses

| Status | Description                                    |
| ------ | ---------------------------------------------- |
| 200    | The ProjectMemberList! in data.projectMembers. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query ProjectMembers($projectReference: ID!) {\n  projectMembers(projectReference: $projectReference) {\n    data {\n      userId\n      email\n      name\n      avatarSrc\n      role\n      source\n      capabilities\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "projectReference": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "projectMembers": {
      "data": [
        {
          "userId": "string",
          "email": "user@example.com",
          "name": "string",
          "avatarSrc": "string",
          "role": "owner",
          "source": "project",
          "capabilities": [
            "string"
          ]
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
