Add admin interface to manage instances subscriptions
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -19,3 +19,87 @@ export const DASHBOARD = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const RELAY_FRAGMENT = gql`
|
||||
fragment relayFragment on Follower {
|
||||
actor {
|
||||
id,
|
||||
preferredUsername,
|
||||
name,
|
||||
domain,
|
||||
type,
|
||||
summary
|
||||
},
|
||||
targetActor {
|
||||
id,
|
||||
preferredUsername,
|
||||
name,
|
||||
domain,
|
||||
type,
|
||||
summary
|
||||
},
|
||||
approved,
|
||||
insertedAt,
|
||||
updatedAt
|
||||
}
|
||||
`;
|
||||
|
||||
export const RELAY_FOLLOWERS = gql`
|
||||
query relayFollowers($page: Int, $limit: Int) {
|
||||
relayFollowers(page: $page, limit: $limit) {
|
||||
elements {
|
||||
...relayFragment
|
||||
},
|
||||
total
|
||||
}
|
||||
}
|
||||
${RELAY_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const RELAY_FOLLOWINGS = gql`
|
||||
query relayFollowings($page: Int, $limit: Int) {
|
||||
relayFollowings(page: $page, limit: $limit) {
|
||||
elements {
|
||||
...relayFragment
|
||||
},
|
||||
total
|
||||
}
|
||||
}
|
||||
${RELAY_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const ADD_RELAY = gql`
|
||||
mutation addRelay($address: String!) {
|
||||
addRelay(address: $address) {
|
||||
...relayFragment
|
||||
}
|
||||
}
|
||||
${RELAY_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const REMOVE_RELAY = gql`
|
||||
mutation removeRelay($address: String!) {
|
||||
removeRelay(address: $address) {
|
||||
...relayFragment
|
||||
}
|
||||
}
|
||||
${RELAY_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const ACCEPT_RELAY = gql`
|
||||
mutation acceptRelay($address: String!) {
|
||||
acceptRelay(address: $address) {
|
||||
...relayFragment
|
||||
}
|
||||
}
|
||||
${RELAY_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const REJECT_RELAY = gql`
|
||||
mutation rejectRelay($address: String!) {
|
||||
rejectRelay(address: $address) {
|
||||
...relayFragment
|
||||
}
|
||||
}
|
||||
${RELAY_FRAGMENT}
|
||||
`;
|
||||
|
||||
@@ -13,6 +13,7 @@ export const COMMENT_FIELDS_FRAGMENT = gql`
|
||||
url
|
||||
},
|
||||
id,
|
||||
domain,
|
||||
preferredUsername,
|
||||
name
|
||||
},
|
||||
|
||||
@@ -10,7 +10,8 @@ const participantQuery = `
|
||||
url
|
||||
},
|
||||
name,
|
||||
id
|
||||
id,
|
||||
domain
|
||||
},
|
||||
event {
|
||||
id
|
||||
@@ -441,3 +442,21 @@ export const EVENT_PERSON_PARTICIPATION = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const EVENT_PERSON_PARTICIPATION_SUBSCRIPTION_CHANGED = gql`
|
||||
subscription ($actorId: ID!, $eventId: ID!) {
|
||||
eventPersonParticipationChanged(personId: $actorId) {
|
||||
id,
|
||||
participations(eventId: $eventId) {
|
||||
id,
|
||||
role,
|
||||
actor {
|
||||
id
|
||||
},
|
||||
event {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -18,7 +18,9 @@ export const REPORTS = gql`
|
||||
name,
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
},
|
||||
domain,
|
||||
type
|
||||
},
|
||||
event {
|
||||
id,
|
||||
@@ -52,7 +54,9 @@ const REPORT_FRAGMENT = gql`
|
||||
name,
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
},
|
||||
domain,
|
||||
type
|
||||
},
|
||||
event {
|
||||
id,
|
||||
@@ -111,9 +115,10 @@ export const CREATE_REPORT = gql`
|
||||
$reporterId: ID!,
|
||||
$reportedId: ID!,
|
||||
$content: String,
|
||||
$commentsIds: [ID]
|
||||
$commentsIds: [ID],
|
||||
$forward: Boolean
|
||||
) {
|
||||
createReport(eventId: $eventId, reporterId: $reporterId, reportedId: $reportedId, content: $content, commentsIds: $commentsIds) {
|
||||
createReport(eventId: $eventId, reporterId: $reporterId, reportedId: $reportedId, content: $content, commentsIds: $commentsIds, forward: $forward) {
|
||||
id
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user