2019-09-09 09:31:08 +02:00
|
|
|
import gql from 'graphql-tag';
|
|
|
|
|
|
|
|
export const DASHBOARD = gql`
|
|
|
|
query {
|
|
|
|
dashboard {
|
|
|
|
lastPublicEventPublished {
|
2019-10-03 12:32:20 +02:00
|
|
|
uuid,
|
2019-09-09 09:31:08 +02:00
|
|
|
title,
|
|
|
|
picture {
|
2019-10-07 16:48:13 +02:00
|
|
|
id,
|
|
|
|
alt,
|
2019-09-09 09:31:08 +02:00
|
|
|
url
|
|
|
|
},
|
|
|
|
},
|
|
|
|
numberOfUsers,
|
|
|
|
numberOfEvents,
|
|
|
|
numberOfComments,
|
|
|
|
numberOfReports
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2019-12-03 11:29:51 +01:00
|
|
|
|
|
|
|
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}
|
|
|
|
`;
|