List User's Groups
On this page
GraphQL endpoint: /user
Lists the user's groups. This returns the groups the current user is a member of.
Query
query (
$limit: Int
) {
userGroups (
limit: $limit
) {
role
group {
id
name
metadata
logo_url
visibility
}
}
}
Variables
{}
Response
{
"data": {
"userGroups": [
{
"group": {
"id": "00000000-0000-4000-8000-000000000001",
"logo_url": "logo_url",
"metadata": {
"test": "value"
},
"name": "test group",
"visibility": [
"PUBLIC"
]
},
"role": "MEMBER"
},
{
"group": {
"id": "00000000-0000-4000-8000-000000000002",
"logo_url": "logo_url",
"metadata": {
"test": "value"
},
"name": "test group",
"visibility": [
"PUBLIC"
]
},
"role": "MEMBER"
},
{
"group": {
"id": "00000000-0000-4000-8000-000000000003",
"logo_url": "logo_url",
"metadata": {
"test": "value"
},
"name": "test group",
"visibility": [
"PUBLIC"
]
},
"role": "MEMBER"
},
{
"group": {
"id": "00000000-0000-4000-8000-000000000004",
"logo_url": "logo_url",
"metadata": {
"test": "value"
},
"name": "test group",
"visibility": [
"PUBLIC"
]
},
"role": "MEMBER"
},
{
"group": {
"id": "00000000-0000-4000-8000-000000000005",
"logo_url": "logo_url",
"metadata": {
"test": "value"
},
"name": "test group",
"visibility": [
"PUBLIC"
]
},
"role": "MEMBER"
}
]
}
}