> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/007_groups/004__list_paginated_user_groups.md).

# List User Groups (Paginated)

GraphQL endpoint: `/user`

Lists the groups the calling user is a member of, most recent first, including the user's role in each group. Results are cursor-paginated: pass `limit` and the previous page's `nextCursor` as `cursor` to fetch the next page.

## Query

```graphql
query ($limit: Int, $cursor: String) {
  paginatedUserGroups(limit: $limit, cursor: $cursor) {
    paginationInfo {
      limit
      nextCursor
    }
    records {
      id
      role
      group {
        id
        name
      }
    }
  }
}

```

## Variables

```json
{}
```

## Response

```json
{
  "data": {
    "paginatedUserGroups": {
      "paginationInfo": {
        "limit": 20,
        "nextCursor": null
      },
      "records": [
        {
          "group": {
            "id": "00000000-0000-4000-8000-000000000001",
            "name": "test group"
          },
          "id": "00000000-0000-4000-8000-000000000002",
          "role": "MEMBER"
        },
        {
          "group": {
            "id": "00000000-0000-4000-8000-000000000003",
            "name": "test group"
          },
          "id": "00000000-0000-4000-8000-000000000004",
          "role": "MEMBER"
        },
        {
          "group": {
            "id": "00000000-0000-4000-8000-000000000005",
            "name": "test group"
          },
          "id": "00000000-0000-4000-8000-000000000006",
          "role": "MEMBER"
        }
      ]
    }
  }
}
```
