2020-02-18 07:57:00 +00:00
|
|
|
import gql from "graphql-tag";
|
2018-11-06 09:30:27 +00:00
|
|
|
|
|
|
|
export const LOGIN = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
mutation Login($email: String!, $password: String!) {
|
|
|
|
login(email: $email, password: $password) {
|
|
|
|
accessToken
|
|
|
|
refreshToken
|
|
|
|
user {
|
|
|
|
id
|
|
|
|
email
|
|
|
|
role
|
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
`;
|
2019-01-11 12:58:29 +00:00
|
|
|
|
|
|
|
export const SEND_RESET_PASSWORD = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
mutation SendResetPassword($email: String!) {
|
|
|
|
sendResetPassword(email: $email)
|
|
|
|
}
|
2019-01-11 12:58:29 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const RESET_PASSWORD = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
mutation ResetPassword($token: String!, $password: String!) {
|
|
|
|
resetPassword(token: $token, password: $password) {
|
|
|
|
accessToken
|
|
|
|
refreshToken
|
|
|
|
user {
|
|
|
|
id
|
|
|
|
}
|
2019-01-11 12:58:29 +00:00
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-01-11 12:58:29 +00:00
|
|
|
`;
|
2019-01-11 13:07:14 +00:00
|
|
|
|
|
|
|
export const RESEND_CONFIRMATION_EMAIL = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
mutation ResendConfirmationEmail($email: String!) {
|
|
|
|
resendConfirmationEmail(email: $email)
|
|
|
|
}
|
2019-01-11 13:07:14 +00:00
|
|
|
`;
|
2019-08-12 14:04:16 +00:00
|
|
|
|
|
|
|
export const REFRESH_TOKEN = gql`
|
|
|
|
mutation RefreshToken($refreshToken: String!) {
|
|
|
|
refreshToken(refreshToken: $refreshToken) {
|
2020-02-18 07:57:00 +00:00
|
|
|
accessToken
|
|
|
|
refreshToken
|
2019-08-12 14:04:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2021-05-25 09:00:46 +00:00
|
|
|
|
|
|
|
export const LOGOUT = gql`
|
|
|
|
mutation Logout($refreshToken: String!) {
|
|
|
|
logout(refreshToken: $refreshToken)
|
|
|
|
}
|
|
|
|
`;
|