AuthQueries.js
722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import gql from "graphql-tag";
export const LOG_IN = gql`
mutation login($email: String!, $password: String!) {
login(email: $email, password: $password) {
token
user {
id
}
}
}
`;
export const SIGN_UP = gql`
mutation createAccount(
$email: String!
$username: String!
$password: String!
$password2: String!
$phoneNum: String!
) {
createAccount(
email: $email
username: $username
password: $password
password2: $password2
phoneNum: $phoneNum
) {
token
user {
id
}
}
}
`;
export const LOCAL_LOG_IN = gql`
mutation logUserIn($token: String!) {
logUserIn(token: $token) @client
}
`;