2021-01-20 18:16:44 +01:00
|
|
|
import gql from "graphql-tag";
|
2021-10-29 10:54:35 +02:00
|
|
|
import { ACTOR_FRAGMENT } from "./actor";
|
2021-01-20 18:16:44 +01:00
|
|
|
|
|
|
|
export const GROUP_FOLLOWERS = gql`
|
2021-05-17 19:01:08 +02:00
|
|
|
query (
|
2021-01-20 18:16:44 +01:00
|
|
|
$name: String!
|
|
|
|
$followersPage: Int
|
|
|
|
$followersLimit: Int
|
|
|
|
$approved: Boolean
|
|
|
|
) {
|
|
|
|
group(preferredUsername: $name) {
|
2021-10-29 10:54:35 +02:00
|
|
|
...ActorFragment
|
2021-01-20 18:16:44 +01:00
|
|
|
followers(
|
|
|
|
page: $followersPage
|
|
|
|
limit: $followersLimit
|
|
|
|
approved: $approved
|
|
|
|
) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
actor {
|
2021-10-29 10:54:35 +02:00
|
|
|
...ActorFragment
|
2021-01-20 18:16:44 +01:00
|
|
|
}
|
|
|
|
approved
|
|
|
|
insertedAt
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-10-29 10:54:35 +02:00
|
|
|
${ACTOR_FRAGMENT}
|
2021-01-20 18:16:44 +01:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const UPDATE_FOLLOWER = gql`
|
|
|
|
mutation UpdateFollower($id: ID!, $approved: Boolean) {
|
|
|
|
updateFollower(id: $id, approved: $approved) {
|
|
|
|
id
|
|
|
|
approved
|
2022-07-12 10:55:28 +02:00
|
|
|
actor {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
}
|
2021-01-20 18:16:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2021-10-25 13:18:13 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|