forked from notiz-dev/nestjs-prisma-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauth.graphql
41 lines (35 loc) · 785 Bytes
/
auth.graphql
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
mutation Admin {
login(data: { email: "[email protected]", password: "secret42" }) {
...AuthTokens
}
}
mutation User {
login(data: { email: "[email protected]", password: "secret42" }) {
...AuthTokens
}
}
mutation AuthUser {
signup(data: { email: "[email protected]", password: "secret42" }) {
...AuthTokens
}
}
mutation RefreshToken {
refreshToken(token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJja3lqdDZrdmkwMDIxcHdldmM0OW8zYTAyIiwiaWF0IjoxNjQ0ODMyNzYyLCJleHAiOjE2NDU0Mzc1NjJ9.eSD3zIsVBNS1pTRtYjjYrCWUYBcUL5ZeCpPTDXEc68Y") {
...TokenData
}
}
fragment UserData on User {
id
email
}
fragment AuthTokens on Auth {
accessToken
refreshToken
user {
...UserData
}
}
fragment TokenData on Token {
accessToken
refreshToken
}