Fix following groups + Add interface to manage followers
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
49
js/src/graphql/followers.ts
Normal file
49
js/src/graphql/followers.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const GROUP_FOLLOWERS = gql`
|
||||
query(
|
||||
$name: String!
|
||||
$followersPage: Int
|
||||
$followersLimit: Int
|
||||
$approved: Boolean
|
||||
) {
|
||||
group(preferredUsername: $name) {
|
||||
id
|
||||
preferredUsername
|
||||
name
|
||||
domain
|
||||
followers(
|
||||
page: $followersPage
|
||||
limit: $followersLimit
|
||||
approved: $approved
|
||||
) {
|
||||
total
|
||||
elements {
|
||||
id
|
||||
actor {
|
||||
id
|
||||
preferredUsername
|
||||
name
|
||||
domain
|
||||
avatar {
|
||||
id
|
||||
url
|
||||
}
|
||||
}
|
||||
approved
|
||||
insertedAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_FOLLOWER = gql`
|
||||
mutation UpdateFollower($id: ID!, $approved: Boolean) {
|
||||
updateFollower(id: $id, approved: $approved) {
|
||||
id
|
||||
approved
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user