Mutation
mutation AddUserToGroup($groupId: String!, $userId: String!) {
addUserToGroup(groupId: $groupId, userId: $userId) {
createdAt
id
name
users {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
}
}Variables
{
"groupId": "string",
"userId": "string"
}Response
{
"data": {
"addUserToGroup": {
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
}
]
}
}
}Mutations
addUserToGroup
Adds a user to a group and returns the group.
MUTATION
addUserToGroup(groupId: String!, userId: String!): UserGroup!Arguments
groupId
String!
required
Id of the group.
userId
String!
required
Id of the user to add.
Returns
createdAt
DateTime!
When the group was created.
id
String!
Id of the group.
name
String!
Name of the group.
users
[User!]!
Members of the group. Empty if there are no members.
Mutation
mutation AddUserToGroup($groupId: String!, $userId: String!) {
addUserToGroup(groupId: $groupId, userId: $userId) {
createdAt
id
name
users {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
__typename
}
}
}
}Variables
{
"groupId": "string",
"userId": "string"
}Response
{
"data": {
"addUserToGroup": {
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"__typename": "UserGroup"
}
]
}
]
}
}
}