Introduce registerPerson mutation

To register a profile from an unactivated user

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

👤 Fix Person interface use

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Change host function for data property

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-01-29 11:02:32 +01:00
parent c55ae19f84
commit 681653e035
13 changed files with 519 additions and 172 deletions

View File

@@ -39,10 +39,34 @@ query {
export const CREATE_PERSON = gql`
mutation CreatePerson($preferredUsername: String!) {
createPerson(preferredUsername: $preferredUsername) {
createPerson(
preferredUsername: $preferredUsername,
name: $name,
summary: $summary
) {
preferredUsername,
name,
summary,
avatarUrl
}
}
`
`;
/**
* This one is used only to register the first account. Prefer CREATE_PERSON when creating another identity
*/
export const REGISTER_PERSON = gql`
mutation ($preferredUsername: String!, $name: String!, $summary: String!, $email: String!) {
registerPerson(
preferredUsername: $preferredUsername,
name: $name,
summary: $summary,
email: $email
) {
preferredUsername,
name,
summary,
avatarUrl,
}
}
`;

View File

@@ -1,8 +1,8 @@
import gql from 'graphql-tag';
export const CREATE_USER = gql`
mutation CreateUser($email: String!, $username: String!, $password: String!) {
createUser(email: $email, username: $username, password: $password) {
mutation CreateUser($email: String!, $password: String!) {
createUser(email: $email, password: $password) {
email,
confirmationSentAt
}