mobilizon.chapril.org-mobil.../js/src/graphql/auth.ts

49 lines
976 B
TypeScript
Raw Normal View History

import gql from "graphql-tag";
export const LOGIN = gql`
mutation Login($email: String!, $password: String!) {
login(email: $email, password: $password) {
accessToken
refreshToken
user {
id
email
role
}
}
}
`;
2019-01-11 13:58:29 +01:00
export const SEND_RESET_PASSWORD = gql`
mutation SendResetPassword($email: String!) {
sendResetPassword(email: $email)
}
2019-01-11 13:58:29 +01:00
`;
export const RESET_PASSWORD = gql`
mutation ResetPassword($token: String!, $password: String!) {
resetPassword(token: $token, password: $password) {
accessToken
refreshToken
user {
id
}
2019-01-11 13:58:29 +01:00
}
}
2019-01-11 13:58:29 +01:00
`;
2019-01-11 14:07:14 +01:00
export const RESEND_CONFIRMATION_EMAIL = gql`
mutation ResendConfirmationEmail($email: String!) {
resendConfirmationEmail(email: $email)
}
2019-01-11 14:07:14 +01:00
`;
2019-08-12 16:04:16 +02:00
export const REFRESH_TOKEN = gql`
mutation RefreshToken($refreshToken: String!) {
refreshToken(refreshToken: $refreshToken) {
accessToken
refreshToken
2019-08-12 16:04:16 +02:00
}
}
`;