...
Note |
---|
To receive error messages when creating a user, make sure to add the errors in the return object as seen below in the query example. |
...
Code Block |
---|
mutation {
createUser(
input: {
user: {
firstName:<STRING> "Luke",
lastName:<STRING> "Skywalker",
credentials: {
username: <STRING>"luke_skywalker",
password: <STRING>"womprats!1977"
},
email: <STRING>"luke.skywalker@jedi.org"
},
requestedOriginGroup: <STRING>"DEFAULT"
requestedLicenses: Array<LicenseType.ENUM>[VIEWER],
requestedGroups: Array<STRING>["DEFAULT", "JEDI"]
) {
errors {
path
message
fullMessage
}
user {
id
username
email
}
}
} |
...
Code Block |
---|
{
"first": 1,
"fullText": "luke@jedi.org"
} |
Code Block |
---|
query FetchMembers($fullText: String, $first: Int!) {
viewer {
currentOrganization {
members(fullText: $fullText, first: $first)
{
nodes {
firstName
lastName
username
email
}
}
}
}
} |
...
This query uses the users
query field, which is available on v2.28.1
and above.
Code Block |
---|
{
users(
fullText: "luke@jedi.org"
first: 1
)
{
errors {
fullMessage
}
nodes {
id
firstName
lastName
username
email
}
totalCount
}
} |
...
Code Block |
---|
{
"input": {
"id": <STRING>,
"requestedGroups": Array<STRING>,
"requestedLicenses": Array<STRING>,
"requestedOriginGroup": <STRING>,
"user": {
"email": <STRING>,
"firstName": <STRING>,
"lastName": <STRING>,
"phone": <STRING>,
"jobTitle": <STRING>
}
}
} |
Code Block |
---|
mutation updateUser($input: UpdateUserMutationInput!) {
updateUser(input: $input) {
user {
id
email
firstName
lastName
phone
jobTitle
licenses {
nodes {
licenseType
}
}
groups {
nodes {
name
}
}
}
errors {
fullMessage
}
success
}
} |
...
Code Block |
---|
|
{"input": {"ids": Array<String> } } |
Code Block |
---|
mutation deleteUsers($input: DeleteUsersMutationInput!) {
deleteUsers(input: $input) {
errors {
fullMessage
}
success
undeletedItems {
id
name
}
}
} |
...