Introduce group basic federation, event new page and notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
import gql from 'graphql-tag';
|
||||
import gql from "graphql-tag";
|
||||
|
||||
export const CREATE_USER = gql`
|
||||
mutation CreateUser($email: String!, $password: String!, $locale: String) {
|
||||
createUser(email: $email, password: $password, locale: $locale) {
|
||||
email,
|
||||
confirmationSentAt
|
||||
mutation CreateUser($email: String!, $password: String!, $locale: String) {
|
||||
createUser(email: $email, password: $password, locale: $locale) {
|
||||
email
|
||||
confirmationSentAt
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const VALIDATE_USER = gql`
|
||||
mutation ValidateUser($token: String!) {
|
||||
validateUser(token: $token) {
|
||||
accessToken,
|
||||
refreshToken,
|
||||
user {
|
||||
id,
|
||||
email,
|
||||
defaultActor {
|
||||
id,
|
||||
preferredUsername,
|
||||
name,
|
||||
avatar {
|
||||
mutation ValidateUser($token: String!) {
|
||||
validateUser(token: $token) {
|
||||
accessToken
|
||||
refreshToken
|
||||
user {
|
||||
id
|
||||
email
|
||||
defaultActor {
|
||||
id
|
||||
preferredUsername
|
||||
name
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const LOGGED_USER = gql`
|
||||
query {
|
||||
loggedUser {
|
||||
id,
|
||||
id
|
||||
email
|
||||
}
|
||||
}
|
||||
@@ -57,9 +57,7 @@ export const CHANGE_EMAIL = gql`
|
||||
|
||||
export const VALIDATE_EMAIL = gql`
|
||||
mutation ValidateEmail($token: String!) {
|
||||
validateEmail(
|
||||
token: $token
|
||||
) {
|
||||
validateEmail(token: $token) {
|
||||
id
|
||||
}
|
||||
}
|
||||
@@ -67,25 +65,69 @@ export const VALIDATE_EMAIL = gql`
|
||||
|
||||
export const DELETE_ACCOUNT = gql`
|
||||
mutation DeleteAccount($password: String!) {
|
||||
deleteAccount (password: $password) {
|
||||
deleteAccount(password: $password) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CURRENT_USER_CLIENT = gql`
|
||||
query {
|
||||
currentUser @client {
|
||||
id,
|
||||
email,
|
||||
isLoggedIn,
|
||||
role
|
||||
query {
|
||||
currentUser @client {
|
||||
id
|
||||
email
|
||||
isLoggedIn
|
||||
role
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_CURRENT_USER_CLIENT = gql`
|
||||
mutation UpdateCurrentUser($id: String!, $email: String!, $isLoggedIn: Boolean!, $role: UserRole!) {
|
||||
updateCurrentUser(id: $id, email: $email, isLoggedIn: $isLoggedIn, role: $role) @client
|
||||
}
|
||||
mutation UpdateCurrentUser(
|
||||
$id: String!
|
||||
$email: String!
|
||||
$isLoggedIn: Boolean!
|
||||
$role: UserRole!
|
||||
) {
|
||||
updateCurrentUser(id: $id, email: $email, isLoggedIn: $isLoggedIn, role: $role) @client
|
||||
}
|
||||
`;
|
||||
|
||||
export const USER_SETTINGS_FRAGMENT = gql`
|
||||
fragment UserSettingFragment on UserSettings {
|
||||
timezone
|
||||
notificationOnDay
|
||||
notificationEachWeek
|
||||
notificationBeforeEvent
|
||||
}
|
||||
`;
|
||||
|
||||
export const USER_SETTINGS = gql`
|
||||
query UserSetting {
|
||||
loggedUser {
|
||||
settings {
|
||||
...UserSettingFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
${USER_SETTINGS_FRAGMENT}
|
||||
`;
|
||||
|
||||
export const SET_USER_SETTINGS = gql`
|
||||
mutation SetUserSettings(
|
||||
$timezone: String
|
||||
$notificationOnDay: Boolean
|
||||
$notificationEachWeek: Boolean
|
||||
$notificationBeforeEvent: Boolean
|
||||
) {
|
||||
setUserSettings(
|
||||
timezone: $timezone
|
||||
notificationOnDay: $notificationOnDay
|
||||
notificationEachWeek: $notificationEachWeek
|
||||
notificationBeforeEvent: $notificationBeforeEvent
|
||||
) {
|
||||
...UserSettingFragment
|
||||
}
|
||||
}
|
||||
${USER_SETTINGS_FRAGMENT}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user