build: switch from yarn to npm to manage js dependencies and move js contents to root
yarn v1 is being deprecated and starts to have some issues Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
54
src/graphql/auth.ts
Normal file
54
src/graphql/auth.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SEND_RESET_PASSWORD = gql`
|
||||
mutation SendResetPassword($email: String!) {
|
||||
sendResetPassword(email: $email)
|
||||
}
|
||||
`;
|
||||
|
||||
export const RESET_PASSWORD = gql`
|
||||
mutation ResetPassword($token: String!, $password: String!) {
|
||||
resetPassword(token: $token, password: $password) {
|
||||
accessToken
|
||||
refreshToken
|
||||
user {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const RESEND_CONFIRMATION_EMAIL = gql`
|
||||
mutation ResendConfirmationEmail($email: String!) {
|
||||
resendConfirmationEmail(email: $email)
|
||||
}
|
||||
`;
|
||||
|
||||
export const REFRESH_TOKEN = gql`
|
||||
mutation RefreshToken($refreshToken: String!) {
|
||||
refreshToken(refreshToken: $refreshToken) {
|
||||
accessToken
|
||||
refreshToken
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const LOGOUT = gql`
|
||||
mutation Logout($refreshToken: String!) {
|
||||
logout(refreshToken: $refreshToken)
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user