mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-31 10:49:00 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			103 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
			
		
		
	
	
			103 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
| query getGroup($urn: String!, $membersCount: Int!) {
 | |
|     corpGroup(urn: $urn) {
 | |
|         urn
 | |
|         type
 | |
|         name
 | |
|         info {
 | |
|             displayName
 | |
|             description
 | |
|             email
 | |
|         }
 | |
|         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
 | |
|                         }
 | |
|                         editableInfo {
 | |
|                             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
 | |
|                         }
 | |
|                         editableInfo {
 | |
|                             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)
 | |
| }
 | 
