2020-02-18 08:57:00 +01:00
|
|
|
import gql from "graphql-tag";
|
2019-09-09 09:31:08 +02:00
|
|
|
|
|
|
|
export const DASHBOARD = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
query {
|
|
|
|
dashboard {
|
|
|
|
lastPublicEventPublished {
|
|
|
|
uuid
|
|
|
|
title
|
|
|
|
picture {
|
|
|
|
id
|
|
|
|
alt
|
|
|
|
url
|
2019-09-09 09:31:08 +02:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
numberOfUsers
|
|
|
|
numberOfEvents
|
|
|
|
numberOfComments
|
|
|
|
numberOfReports
|
2019-09-09 09:31:08 +02:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
`;
|
2019-12-03 11:29:51 +01:00
|
|
|
|
|
|
|
export const RELAY_FRAGMENT = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
fragment relayFragment on Follower {
|
|
|
|
actor {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
type
|
|
|
|
summary
|
|
|
|
}
|
|
|
|
targetActor {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
type
|
|
|
|
summary
|
2019-12-03 11:29:51 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
approved
|
|
|
|
insertedAt
|
|
|
|
updatedAt
|
|
|
|
}
|
2019-12-03 11:29:51 +01:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const RELAY_FOLLOWERS = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
query relayFollowers($page: Int, $limit: Int) {
|
|
|
|
relayFollowers(page: $page, limit: $limit) {
|
|
|
|
elements {
|
|
|
|
...relayFragment
|
|
|
|
}
|
|
|
|
total
|
2019-12-03 11:29:51 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
${RELAY_FRAGMENT}
|
2019-12-03 11:29:51 +01:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const RELAY_FOLLOWINGS = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
query relayFollowings($page: Int, $limit: Int) {
|
|
|
|
relayFollowings(page: $page, limit: $limit) {
|
|
|
|
elements {
|
|
|
|
...relayFragment
|
|
|
|
}
|
|
|
|
total
|
2019-12-03 11:29:51 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
${RELAY_FRAGMENT}
|
2019-12-03 11:29:51 +01:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const ADD_RELAY = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
mutation addRelay($address: String!) {
|
|
|
|
addRelay(address: $address) {
|
|
|
|
...relayFragment
|
2019-12-03 11:29:51 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
${RELAY_FRAGMENT}
|
2019-12-03 11:29:51 +01:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const REMOVE_RELAY = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
mutation removeRelay($address: String!) {
|
|
|
|
removeRelay(address: $address) {
|
|
|
|
...relayFragment
|
2019-12-03 11:29:51 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
${RELAY_FRAGMENT}
|
2019-12-03 11:29:51 +01:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const ACCEPT_RELAY = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
mutation acceptRelay($address: String!) {
|
|
|
|
acceptRelay(address: $address) {
|
|
|
|
...relayFragment
|
2019-12-03 11:29:51 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
${RELAY_FRAGMENT}
|
2019-12-03 11:29:51 +01:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const REJECT_RELAY = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
mutation rejectRelay($address: String!) {
|
|
|
|
rejectRelay(address: $address) {
|
|
|
|
...relayFragment
|
2019-12-03 11:29:51 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
${RELAY_FRAGMENT}
|
2019-12-03 11:29:51 +01:00
|
|
|
`;
|
2019-12-20 13:04:34 +01:00
|
|
|
|
|
|
|
export const ADMIN_SETTINGS_FRAGMENT = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
fragment adminSettingsFragment on AdminSettings {
|
|
|
|
instanceName
|
|
|
|
instanceDescription
|
|
|
|
instanceTerms
|
|
|
|
instanceTermsType
|
|
|
|
instanceTermsUrl
|
2020-06-15 11:01:49 +02:00
|
|
|
instanceRules
|
2020-02-18 08:57:00 +01:00
|
|
|
registrationsOpen
|
|
|
|
}
|
2019-12-20 13:04:34 +01:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const ADMIN_SETTINGS = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
query {
|
|
|
|
adminSettings {
|
|
|
|
...adminSettingsFragment
|
2019-12-20 13:04:34 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
${ADMIN_SETTINGS_FRAGMENT}
|
2019-12-20 13:04:34 +01:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const SAVE_ADMIN_SETTINGS = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
mutation SaveAdminSettings(
|
|
|
|
$instanceName: String
|
|
|
|
$instanceDescription: String
|
|
|
|
$instanceTerms: String
|
|
|
|
$instanceTermsType: InstanceTermsType
|
|
|
|
$instanceTermsUrl: String
|
2020-06-15 11:01:49 +02:00
|
|
|
$instanceRules: String
|
2020-02-18 08:57:00 +01:00
|
|
|
$registrationsOpen: Boolean
|
|
|
|
) {
|
|
|
|
saveAdminSettings(
|
|
|
|
instanceName: $instanceName
|
|
|
|
instanceDescription: $instanceDescription
|
|
|
|
instanceTerms: $instanceTerms
|
|
|
|
instanceTermsType: $instanceTermsType
|
|
|
|
instanceTermsUrl: $instanceTermsUrl
|
2020-06-15 11:01:49 +02:00
|
|
|
instanceRules: $instanceRules
|
2020-02-18 08:57:00 +01:00
|
|
|
registrationsOpen: $registrationsOpen
|
|
|
|
) {
|
|
|
|
...adminSettingsFragment
|
2019-12-20 13:04:34 +01:00
|
|
|
}
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
${ADMIN_SETTINGS_FRAGMENT}
|
2019-12-20 13:04:34 +01:00
|
|
|
`;
|