# Update Group

GraphQL endpoint: `/user`

Updates an existing group's information. Only group admins can update group settings. You can update the name, metadata, secret storage, and visibility settings.

## Query

```graphql
mutation (
  $groupId: ID!
  $name: String
  $metadata: JSON
  $secretStorage: JSON
  $visibility: [GroupVisibilityType!]
) {
  updateGroup (
    groupId: $groupId
    name: $name
    metadata: $metadata
    secretStorage: $secretStorage
    visibility: $visibility
  ) {
    id
    name
    metadata
    secretStorage
    visibility
    }
  }

```

## Variables

```json
{
  "groupId": "00000000-0000-4000-8000-000000000001",
  "metadata": {
    "test": "updated-value"
  },
  "name": "updated-groupname",
  "secretStorage": {
    "secret-key": "secret-value"
  },
  "visibility": [
    "CONNECTIONS"
  ]
}
```

## Response

```json
{
  "data": {
    "updateGroup": {
      "id": "00000000-0000-4000-8000-000000000001",
      "metadata": {
        "test": "updated-value"
      },
      "name": "updated-groupname",
      "secretStorage": {
        "secret-key": "secret-value"
      },
      "visibility": [
        "CONNECTIONS"
      ]
    }
  }
}
```
