Redirect to profile creation when user has no identities
Also load persons by ID instead of preferred_username Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import gql from 'graphql-tag';
|
||||
|
||||
export const FETCH_PERSON = gql`
|
||||
query($name:String!) {
|
||||
person(preferredUsername: $name) {
|
||||
query($username: String!) {
|
||||
fetchPerson(preferredUsername: $username) {
|
||||
id,
|
||||
url,
|
||||
name,
|
||||
@@ -29,6 +29,35 @@ query($name:String!) {
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_PERSON = gql`
|
||||
query($actorId: ID!) {
|
||||
person(id: $actorId) {
|
||||
id,
|
||||
url,
|
||||
name,
|
||||
domain,
|
||||
summary,
|
||||
preferredUsername,
|
||||
suspended,
|
||||
avatar {
|
||||
name,
|
||||
url
|
||||
},
|
||||
banner {
|
||||
url
|
||||
},
|
||||
feedTokens {
|
||||
token
|
||||
},
|
||||
organizedEvents {
|
||||
uuid,
|
||||
title,
|
||||
beginsOn
|
||||
},
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const LOGGED_PERSON = gql`
|
||||
query {
|
||||
loggedPerson {
|
||||
@@ -172,9 +201,9 @@ mutation CreatePerson($preferredUsername: String!, $name: String!, $summary: Str
|
||||
`;
|
||||
|
||||
export const UPDATE_PERSON = gql`
|
||||
mutation UpdatePerson($preferredUsername: String!, $name: String, $summary: String, $avatar: PictureInput) {
|
||||
mutation UpdatePerson($id: ID!, $name: String, $summary: String, $avatar: PictureInput) {
|
||||
updatePerson(
|
||||
preferredUsername: $preferredUsername,
|
||||
id: $id,
|
||||
name: $name,
|
||||
summary: $summary,
|
||||
avatar: $avatar
|
||||
@@ -191,8 +220,8 @@ export const UPDATE_PERSON = gql`
|
||||
`;
|
||||
|
||||
export const DELETE_PERSON = gql`
|
||||
mutation DeletePerson($preferredUsername: String!) {
|
||||
deletePerson(preferredUsername: $preferredUsername) {
|
||||
mutation DeletePerson($id: ID!) {
|
||||
deletePerson(id: $id) {
|
||||
preferredUsername,
|
||||
}
|
||||
}
|
||||
@@ -209,6 +238,7 @@ mutation ($preferredUsername: String!, $name: String!, $summary: String!, $email
|
||||
summary: $summary,
|
||||
email: $email
|
||||
) {
|
||||
id,
|
||||
preferredUsername,
|
||||
name,
|
||||
summary,
|
||||
|
||||
@@ -221,6 +221,8 @@ export const CREATE_EVENT = gql`
|
||||
id,
|
||||
uuid,
|
||||
title,
|
||||
url,
|
||||
local,
|
||||
description,
|
||||
beginsOn,
|
||||
endsOn,
|
||||
@@ -239,14 +241,25 @@ export const CREATE_EVENT = gql`
|
||||
physicalAddress {
|
||||
${physicalAddressQuery}
|
||||
},
|
||||
organizerActor {
|
||||
avatar {
|
||||
url
|
||||
},
|
||||
preferredUsername,
|
||||
domain,
|
||||
name,
|
||||
url,
|
||||
id,
|
||||
},
|
||||
participantStats {
|
||||
approved,
|
||||
unapproved
|
||||
},
|
||||
tags {
|
||||
${tagsQuery}
|
||||
},
|
||||
options {
|
||||
${optionsQuery}
|
||||
},
|
||||
organizerActor {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,8 +410,8 @@ export const PARTICIPANTS = gql`
|
||||
`;
|
||||
|
||||
export const EVENT_PERSON_PARTICIPATION = gql`
|
||||
query($name: String!, $eventId: ID!) {
|
||||
person(preferredUsername: $name) {
|
||||
query($actorId: ID!, $eventId: ID!) {
|
||||
person(id: $actorId) {
|
||||
id,
|
||||
participations(eventId: $eventId) {
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user