Add front-end for managing group follow

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-10-25 13:18:13 +02:00
parent 244a349b7d
commit f8eda4aac5
12 changed files with 217 additions and 20 deletions

View File

@@ -433,7 +433,7 @@ export const PERSON_MEMBERSHIPS = gql`
}
`;
export const PERSON_MEMBERSHIP_GROUP = gql`
export const PERSON_STATUS_GROUP = gql`
query PersonMembershipGroup($id: ID!, $group: String!) {
person(id: $id) {
id
@@ -461,6 +461,35 @@ export const PERSON_MEMBERSHIP_GROUP = gql`
updatedAt
}
}
follows(group: $group) {
total
elements {
id
notify
target_actor {
id
preferredUsername
name
domain
avatar {
id
url
}
}
actor {
id
preferredUsername
name
domain
avatar {
id
url
}
}
insertedAt
updatedAt
}
}
}
}
`;

View File

@@ -47,3 +47,28 @@ export const UPDATE_FOLLOWER = gql`
}
}
`;
export const FOLLOW_GROUP = gql`
mutation FollowGroup($groupId: ID!, $notify: Boolean) {
followGroup(groupId: $groupId, notify: $notify) {
id
}
}
`;
export const UNFOLLOW_GROUP = gql`
mutation UnfollowGroup($groupId: ID!) {
unfollowGroup(groupId: $groupId) {
id
}
}
`;
export const UPDATE_GROUP_FOLLOW = gql`
mutation UpdateGroupFollow($followId: ID!, $notify: Boolean) {
updateGroupFollow(followId: $followId, notify: $notify) {
id
notify
}
}
`;