2018-11-06 10:30:27 +01:00
|
|
|
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) {
|
2018-12-28 16:13:33 +01:00
|
|
|
email,
|
|
|
|
confirmationSentAt
|
2018-11-06 10:30:27 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const VALIDATE_USER = gql`
|
|
|
|
mutation ValidateUser($token: String!) {
|
|
|
|
validateUser(token: $token) {
|
|
|
|
token,
|
|
|
|
user {
|
|
|
|
id,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2019-01-18 14:47:10 +01:00
|
|
|
|
|
|
|
export const CURRENT_USER_CLIENT = gql`
|
|
|
|
query {
|
|
|
|
currentUser @client {
|
|
|
|
id,
|
|
|
|
email
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const UPDATE_CURRENT_USER_CLIENT = gql`
|
|
|
|
mutation UpdateCurrentUser($id: Int!, $email: String!) {
|
|
|
|
updateCurrentUser(id: $id, email: $email) @client
|
|
|
|
}
|
|
|
|
`
|