Improve member adding and excluding flow
Allow to exclude a member Send emails to the member when it's excluded Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -1,23 +1,52 @@
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const MEMBER_FRAGMENT = gql`
|
||||
fragment MemberFragment on Member {
|
||||
id
|
||||
role
|
||||
parent {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
name
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
}
|
||||
actor {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
name
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
}
|
||||
insertedAt
|
||||
}
|
||||
`;
|
||||
|
||||
export const INVITE_MEMBER = gql`
|
||||
mutation InviteMember($groupId: ID!, $targetActorUsername: String!) {
|
||||
inviteMember(groupId: $groupId, targetActorUsername: $targetActorUsername) {
|
||||
id
|
||||
role
|
||||
parent {
|
||||
id
|
||||
}
|
||||
actor {
|
||||
id
|
||||
}
|
||||
...MemberFragment
|
||||
}
|
||||
}
|
||||
${MEMBER_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const ACCEPT_INVITATION = gql`
|
||||
mutation AcceptInvitation($id: ID!) {
|
||||
acceptInvitation(id: $id) {
|
||||
...MemberFragment
|
||||
}
|
||||
}
|
||||
${MEMBER_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const REJECT_INVITATION = gql`
|
||||
mutation RejectInvitation($id: ID!) {
|
||||
rejectInvitation(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
@@ -33,6 +62,7 @@ export const GROUP_MEMBERS = gql`
|
||||
preferredUsername
|
||||
members(page: $page, limit: $limit, roles: $roles) {
|
||||
elements {
|
||||
id
|
||||
role
|
||||
actor {
|
||||
id
|
||||
@@ -50,3 +80,11 @@ export const GROUP_MEMBERS = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const REMOVE_MEMBER = gql`
|
||||
mutation RemoveMember($groupId: ID!, $memberId: ID!) {
|
||||
removeMember(groupId: $groupId, memberId: $memberId) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user