Mutation
mutation RemoveUserLocation($locationId: Int!, $userId: String!) {
removeUserLocation(locationId: $locationId, userId: $userId) {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
}Variables
{
"locationId": 1,
"userId": "string"
}Response
{
"data": {
"removeUserLocation": {
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
}
}
}Mutations
removeUserLocation
Removes a user’s assignment to a site and returns the user. Does nothing when the user is not assigned to the site.
MUTATION
removeUserLocation(locationId: Int!, userId: String!): UserArguments
locationId
Int!
required
Id of the site to remove the user from.
userId
String!
required
Id of the user to unassign.
Returns
allowedLocations
[Location!]!
Sites the user is assigned to. Empty if there are no site assignments.
avatarUrl
String
Relative URL of the user's profile photo.
department
String
Department.
email
String!
Work email address.
firstName
String!
Given name.
groups
[UserGroup!]!
Groups the user belongs to. Empty if there are no groups.
id
String!
Id of the user.
lastName
String!
Family name.
locationAssignments
The user's site assignments, each with the site and the user's role there. Empty if there are no site assignments.
name
String!
Full name.
role
String!
One of 'org:admin' (Admin) or 'org:member' (Member).
specialty
String
Specialty.
subSpecialty
String
Sub-specialty.
supervisor
The user's supervisor.
supervisorId
String
Id of the user's supervisor.
title
String
Job title.
Mutation
mutation RemoveUserLocation($locationId: Int!, $userId: String!) {
removeUserLocation(locationId: $locationId, userId: $userId) {
allowedLocations {
children {
__typename
}
id
isSite
location
parentId
tags
}
avatarUrl
department
email
firstName
groups {
createdAt
id
name
users {
__typename
}
}
}
}Variables
{
"locationId": 1,
"userId": "string"
}Response
{
"data": {
"removeUserLocation": {
"allowedLocations": [
{
"children": [
{
"__typename": "Location"
}
],
"id": 1,
"isSite": true,
"location": "string",
"parentId": 1,
"tags": [
"string"
]
}
],
"avatarUrl": "string",
"department": "string",
"email": "string",
"firstName": "string",
"groups": [
{
"createdAt": "value",
"id": "string",
"name": "string",
"users": [
{
"__typename": "User"
}
]
}
]
}
}
}