List User Groups (Paginated)
On this page
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
query ($limit: Int, $cursor: String) {
paginatedUserGroups(limit: $limit, cursor: $cursor) {
paginationInfo {
limit
nextCursor
}
records {
id
role
group {
id
name
}
}
}
}
Variables
{}
Response
{
"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"
}
]
}
}
}