2020-02-18 07:57:00 +00:00
|
|
|
import gql from "graphql-tag";
|
2018-11-06 09:30:27 +00:00
|
|
|
|
2019-01-21 14:08:22 +00:00
|
|
|
export const FETCH_PERSON = gql`
|
2021-05-17 17:01:08 +00:00
|
|
|
query ($username: String!) {
|
2020-02-18 07:57:00 +00:00
|
|
|
fetchPerson(preferredUsername: $username) {
|
|
|
|
id
|
2019-05-22 12:12:11 +00:00
|
|
|
url
|
2020-02-18 07:57:00 +00:00
|
|
|
name
|
|
|
|
domain
|
|
|
|
summary
|
|
|
|
preferredUsername
|
|
|
|
suspended
|
2020-11-23 15:58:50 +00:00
|
|
|
mediaSize
|
2020-02-18 07:57:00 +00:00
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
name
|
|
|
|
url
|
|
|
|
}
|
|
|
|
banner {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
feedTokens {
|
2019-03-21 19:23:42 +00:00
|
|
|
token
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
|
|
|
organizedEvents {
|
2020-06-15 16:12:49 +00:00
|
|
|
total
|
|
|
|
elements {
|
2020-10-21 10:14:53 +00:00
|
|
|
id
|
2020-06-15 16:12:49 +00:00
|
|
|
uuid
|
|
|
|
title
|
|
|
|
beginsOn
|
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2019-10-04 16:28:25 +00:00
|
|
|
export const GET_PERSON = gql`
|
2021-05-12 16:10:07 +00:00
|
|
|
query Person(
|
2020-06-11 17:13:21 +00:00
|
|
|
$actorId: ID!
|
|
|
|
$organizedEventsPage: Int
|
|
|
|
$organizedEventsLimit: Int
|
|
|
|
$participationPage: Int
|
|
|
|
$participationLimit: Int
|
2021-05-12 16:10:07 +00:00
|
|
|
$membershipsPage: Int
|
|
|
|
$membershipsLimit: Int
|
2020-06-11 17:13:21 +00:00
|
|
|
) {
|
2020-02-18 07:57:00 +00:00
|
|
|
person(id: $actorId) {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
summary
|
|
|
|
preferredUsername
|
|
|
|
suspended
|
2020-11-23 15:58:50 +00:00
|
|
|
mediaSize
|
2020-02-18 07:57:00 +00:00
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
name
|
|
|
|
url
|
|
|
|
}
|
|
|
|
banner {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
feedTokens {
|
|
|
|
token
|
|
|
|
}
|
2020-11-30 09:24:11 +00:00
|
|
|
organizedEvents(
|
|
|
|
page: $organizedEventsPage
|
|
|
|
limit: $organizedEventsLimit
|
|
|
|
) {
|
2020-06-11 17:13:21 +00:00
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
uuid
|
|
|
|
title
|
|
|
|
beginsOn
|
|
|
|
}
|
|
|
|
}
|
|
|
|
participations(page: $participationPage, limit: $participationLimit) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
event {
|
|
|
|
id
|
|
|
|
uuid
|
|
|
|
title
|
|
|
|
beginsOn
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-05-12 16:10:07 +00:00
|
|
|
memberships(page: $membershipsPage, limit: $membershipsLimit) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
role
|
|
|
|
insertedAt
|
|
|
|
parent {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-11 17:13:21 +00:00
|
|
|
user {
|
|
|
|
id
|
|
|
|
email
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2021-08-05 13:49:54 +00:00
|
|
|
export const PERSON_FRAGMENT = gql`
|
|
|
|
fragment PersonFragment on Person {
|
|
|
|
id
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
type
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2020-06-11 17:13:21 +00:00
|
|
|
export const LIST_PROFILES = gql`
|
|
|
|
query ListProfiles(
|
|
|
|
$preferredUsername: String
|
|
|
|
$name: String
|
|
|
|
$domain: String
|
|
|
|
$local: Boolean
|
|
|
|
$suspended: Boolean
|
|
|
|
$page: Int
|
|
|
|
$limit: Int
|
|
|
|
) {
|
|
|
|
persons(
|
|
|
|
preferredUsername: $preferredUsername
|
|
|
|
name: $name
|
|
|
|
domain: $domain
|
|
|
|
local: $local
|
|
|
|
suspended: $suspended
|
|
|
|
page: $page
|
|
|
|
limit: $limit
|
|
|
|
) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
domain
|
|
|
|
name
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-06-11 17:13:21 +00:00
|
|
|
url
|
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-10-04 16:28:25 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-10-04 16:28:25 +00:00
|
|
|
`;
|
|
|
|
|
2020-02-18 07:57:00 +00:00
|
|
|
export const UPDATE_DEFAULT_ACTOR = gql`
|
|
|
|
mutation ChangeDefaultActor($preferredUsername: String!) {
|
|
|
|
changeDefaultActor(preferredUsername: $preferredUsername) {
|
|
|
|
id
|
|
|
|
defaultActor {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
`;
|
2019-01-21 14:08:22 +00:00
|
|
|
|
2019-09-11 07:59:01 +00:00
|
|
|
export const CURRENT_ACTOR_CLIENT = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
query currentActor {
|
|
|
|
currentActor @client {
|
|
|
|
id
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
preferredUsername
|
|
|
|
name
|
2019-09-11 07:59:01 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-09-11 07:59:01 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const UPDATE_CURRENT_ACTOR_CLIENT = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
mutation UpdateCurrentActor(
|
|
|
|
$id: String!
|
|
|
|
$avatar: String
|
|
|
|
$preferredUsername: String!
|
|
|
|
$name: String!
|
|
|
|
) {
|
2020-09-21 10:15:37 +00:00
|
|
|
updateCurrentActor(
|
|
|
|
id: $id
|
|
|
|
avatar: $avatar
|
|
|
|
preferredUsername: $preferredUsername
|
|
|
|
name: $name
|
|
|
|
) @client
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-09-11 07:59:01 +00:00
|
|
|
`;
|
|
|
|
|
2019-09-18 15:32:37 +00:00
|
|
|
export const LOGGED_USER_PARTICIPATIONS = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
query LoggedUserParticipations(
|
|
|
|
$afterDateTime: DateTime
|
|
|
|
$beforeDateTime: DateTime
|
|
|
|
$page: Int
|
|
|
|
$limit: Int
|
|
|
|
) {
|
|
|
|
loggedUser {
|
2020-10-21 10:14:53 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
participations(
|
|
|
|
afterDatetime: $afterDateTime
|
|
|
|
beforeDatetime: $beforeDateTime
|
|
|
|
page: $page
|
|
|
|
limit: $limit
|
|
|
|
) {
|
|
|
|
total
|
|
|
|
elements {
|
2019-09-18 15:32:37 +00:00
|
|
|
event {
|
2020-02-18 07:57:00 +00:00
|
|
|
id
|
|
|
|
uuid
|
|
|
|
title
|
|
|
|
picture {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
alt
|
|
|
|
}
|
|
|
|
beginsOn
|
|
|
|
visibility
|
|
|
|
organizerActor {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
2020-06-15 17:41:11 +00:00
|
|
|
summary
|
2019-09-18 15:32:37 +00:00
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
2019-09-18 15:32:37 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2020-12-01 16:32:07 +00:00
|
|
|
attributedTo {
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
summary
|
|
|
|
domain
|
|
|
|
url
|
|
|
|
id
|
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
participantStats {
|
2020-06-18 13:23:05 +00:00
|
|
|
going
|
2020-02-18 07:57:00 +00:00
|
|
|
notApproved
|
|
|
|
participant
|
|
|
|
}
|
|
|
|
options {
|
|
|
|
maximumAttendeeCapacity
|
|
|
|
remainingAttendeeCapacity
|
|
|
|
}
|
2020-12-01 16:32:07 +00:00
|
|
|
tags {
|
|
|
|
id
|
|
|
|
slug
|
|
|
|
title
|
|
|
|
}
|
2019-09-18 15:32:37 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
id
|
|
|
|
role
|
|
|
|
actor {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
2020-06-15 17:41:11 +00:00
|
|
|
summary
|
2020-02-18 07:57:00 +00:00
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-18 15:32:37 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-03-21 19:23:42 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
`;
|
2019-03-21 19:23:42 +00:00
|
|
|
|
2019-10-02 15:59:07 +00:00
|
|
|
export const LOGGED_USER_DRAFTS = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
query LoggedUserDrafts($page: Int, $limit: Int) {
|
|
|
|
loggedUser {
|
2020-10-21 10:14:53 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
drafts(page: $page, limit: $limit) {
|
|
|
|
id
|
|
|
|
uuid
|
|
|
|
title
|
|
|
|
picture {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
alt
|
|
|
|
}
|
|
|
|
beginsOn
|
|
|
|
visibility
|
|
|
|
organizerActor {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
participantStats {
|
|
|
|
going
|
|
|
|
notApproved
|
|
|
|
}
|
|
|
|
options {
|
|
|
|
maximumAttendeeCapacity
|
|
|
|
remainingAttendeeCapacity
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const LOGGED_USER_MEMBERSHIPS = gql`
|
|
|
|
query LoggedUserMemberships($page: Int, $limit: Int) {
|
|
|
|
loggedUser {
|
2020-10-21 10:14:53 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
memberships(page: $page, limit: $limit) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
role
|
2020-12-01 15:14:53 +00:00
|
|
|
actor {
|
|
|
|
id
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
parent {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
domain
|
|
|
|
name
|
2021-03-29 08:33:19 +00:00
|
|
|
type
|
2020-02-18 07:57:00 +00:00
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
organizedEvents {
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
title
|
2019-10-02 15:59:07 +00:00
|
|
|
picture {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
2019-10-02 15:59:07 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
|
|
|
total
|
2019-10-02 15:59:07 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
|
|
|
invitedBy {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
domain
|
|
|
|
name
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
2019-10-02 15:59:07 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2019-10-02 15:59:07 +00:00
|
|
|
|
2019-01-21 14:08:22 +00:00
|
|
|
export const IDENTITIES = gql`
|
2021-05-17 16:19:24 +00:00
|
|
|
query Identities {
|
2020-02-18 07:57:00 +00:00
|
|
|
identities {
|
|
|
|
id
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2019-05-22 12:12:11 +00:00
|
|
|
url
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2021-03-29 08:33:19 +00:00
|
|
|
type
|
2020-02-18 07:57:00 +00:00
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
}
|
2019-01-21 14:08:22 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const PERSON_MEMBERSHIPS = gql`
|
|
|
|
query PersonMemberships($id: ID!) {
|
|
|
|
person(id: $id) {
|
|
|
|
id
|
|
|
|
memberships {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
role
|
|
|
|
parent {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
2021-03-29 08:33:19 +00:00
|
|
|
type
|
2020-02-18 07:57:00 +00:00
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
2020-08-14 09:32:23 +00:00
|
|
|
invitedBy {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
}
|
|
|
|
insertedAt
|
|
|
|
updatedAt
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2019-01-21 14:08:22 +00:00
|
|
|
|
2021-10-25 11:18:13 +00:00
|
|
|
export const PERSON_STATUS_GROUP = gql`
|
2021-03-05 10:23:17 +00:00
|
|
|
query PersonMembershipGroup($id: ID!, $group: String!) {
|
|
|
|
person(id: $id) {
|
|
|
|
id
|
|
|
|
memberships(group: $group) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
role
|
|
|
|
parent {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
invitedBy {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
}
|
|
|
|
insertedAt
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
2021-10-25 11:18:13 +00:00
|
|
|
follows(group: $group) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
notify
|
|
|
|
target_actor {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
actor {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
insertedAt
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
2021-03-05 10:23:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const GROUP_MEMBERSHIP_SUBSCRIPTION_CHANGED = gql`
|
2021-05-17 16:19:24 +00:00
|
|
|
subscription GroupMembershipSubscriptionChanged(
|
|
|
|
$actorId: ID!
|
|
|
|
$group: String!
|
|
|
|
) {
|
2021-03-05 10:23:17 +00:00
|
|
|
groupMembershipChanged(personId: $actorId, group: $group) {
|
|
|
|
id
|
|
|
|
memberships {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
role
|
|
|
|
parent {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
invitedBy {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
}
|
|
|
|
insertedAt
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2019-01-21 14:08:22 +00:00
|
|
|
export const CREATE_PERSON = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
mutation CreatePerson(
|
|
|
|
$preferredUsername: String!
|
|
|
|
$name: String!
|
|
|
|
$summary: String
|
2020-11-26 10:41:13 +00:00
|
|
|
$avatar: MediaInput
|
2020-02-18 07:57:00 +00:00
|
|
|
) {
|
|
|
|
createPerson(
|
|
|
|
preferredUsername: $preferredUsername
|
|
|
|
name: $name
|
|
|
|
summary: $summary
|
2019-06-17 15:15:27 +00:00
|
|
|
avatar: $avatar
|
2019-01-29 10:02:32 +00:00
|
|
|
) {
|
2020-02-18 07:57:00 +00:00
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
summary
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
2019-06-17 15:15:27 +00:00
|
|
|
}
|
2019-01-21 14:08:22 +00:00
|
|
|
}
|
2019-01-29 10:02:32 +00:00
|
|
|
`;
|
|
|
|
|
2019-06-17 15:15:27 +00:00
|
|
|
export const UPDATE_PERSON = gql`
|
2020-11-30 09:24:11 +00:00
|
|
|
mutation UpdatePerson(
|
|
|
|
$id: ID!
|
|
|
|
$name: String
|
|
|
|
$summary: String
|
|
|
|
$avatar: MediaInput
|
|
|
|
) {
|
2020-02-18 07:57:00 +00:00
|
|
|
updatePerson(id: $id, name: $name, summary: $summary, avatar: $avatar) {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
summary
|
2019-06-17 15:15:27 +00:00
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2019-06-17 15:15:27 +00:00
|
|
|
url
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-06-17 15:15:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const DELETE_PERSON = gql`
|
2019-10-04 16:28:25 +00:00
|
|
|
mutation DeletePerson($id: ID!) {
|
|
|
|
deletePerson(id: $id) {
|
2020-02-18 07:57:00 +00:00
|
|
|
preferredUsername
|
2019-06-17 15:15:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2019-01-29 10:02:32 +00:00
|
|
|
/**
|
2020-02-18 07:57:00 +00:00
|
|
|
* This one is used only to register the first account.
|
|
|
|
* Prefer CREATE_PERSON when creating another identity
|
2019-01-29 10:02:32 +00:00
|
|
|
*/
|
|
|
|
export const REGISTER_PERSON = gql`
|
2021-05-17 17:01:08 +00:00
|
|
|
mutation (
|
2020-11-30 09:24:11 +00:00
|
|
|
$preferredUsername: String!
|
|
|
|
$name: String!
|
|
|
|
$summary: String!
|
|
|
|
$email: String!
|
|
|
|
) {
|
2020-02-18 07:57:00 +00:00
|
|
|
registerPerson(
|
|
|
|
preferredUsername: $preferredUsername
|
|
|
|
name: $name
|
|
|
|
summary: $summary
|
2019-01-29 10:02:32 +00:00
|
|
|
email: $email
|
|
|
|
) {
|
2020-02-18 07:57:00 +00:00
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
summary
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2020-06-11 17:13:21 +00:00
|
|
|
export const SUSPEND_PROFILE = gql`
|
|
|
|
mutation SuspendProfile($id: ID!) {
|
|
|
|
suspendProfile(id: $id) {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const UNSUSPEND_PROFILE = gql`
|
|
|
|
mutation UnSuspendProfile($id: ID!) {
|
|
|
|
unsuspendProfile(id: $id) {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|