123 lines
3.2 KiB
GraphQL
Raw Normal View History

query getGroup($urn: String!, $membersCount: Int!) {
corpGroup(urn: $urn) {
urn
type
name
info {
displayName
description
email
}
editableProperties {
description
slack
email
}
ownership {
...ownershipFields
}
relationships(input: { types: ["IsMemberOfGroup"], direction: INCOMING, start: 0, count: $membersCount }) {
start
count
total
relationships {
entity {
... on CorpUser {
urn
username
info {
active
displayName
title
firstName
lastName
fullName
}
editableProperties {
displayName
title
pictureLink
}
}
}
}
}
}
}
query getGroupMembers($urn: String!, $start: Int!, $count: Int!) {
corpGroup(urn: $urn) {
relationships(input: { types: ["IsMemberOfGroup"], direction: INCOMING, start: $start, count: $count }) {
start
count
total
relationships {
entity {
... on CorpUser {
urn
username
info {
active
displayName
title
firstName
lastName
fullName
}
properties {
displayName
}
editableInfo {
displayName
pictureLink
}
}
}
}
}
}
}
query listGroups($input: ListGroupsInput!) {
listGroups(input: $input) {
start
count
total
groups {
urn
type
name
info {
displayName
description
email
}
memberCount: relationships(input: { types: ["IsMemberOfGroup"], direction: INCOMING, start: 0, count: 1 }) {
total
}
}
}
}
mutation addGroupMembers($groupUrn: String!, $userUrns: [String!]!) {
addGroupMembers(input: { groupUrn: $groupUrn, userUrns: $userUrns })
}
mutation removeGroupMembers($groupUrn: String!, $userUrns: [String!]!) {
removeGroupMembers(input: { groupUrn: $groupUrn, userUrns: $userUrns })
}
mutation removeGroup($urn: String!) {
removeGroup(urn: $urn)
}
mutation createGroup($input: CreateGroupInput!) {
createGroup(input: $input)
}
mutation updateCorpGroupProperties($urn: String!, $input: CorpGroupUpdateInput!) {
updateCorpGroupProperties(urn: $urn, input: $input) {
urn
}
}